#include <cmdline.h>
Public Types | |
| enum | error_t { unknown_option = 0, invalid_argument = 1, too_many_arguments = 2, no_multiple_use = 3, argument_expected = 4, option_expected = 5 } |
Public Methods | |
| CmdLineException (const std::string &strOption, error_t nError) | |
| virtual | ~CmdLineException () throw () |
| error_t | get_error_code () const |
| const std::string & | get_option () |
| virtual const char * | what () const throw () |
Private Attributes | |
| std::string | m_strOption |
| error_t | m_nError |
| std::string | m_strError |
CmdLineExceptions are thrown in case of command line usage error. They are thrown when parsing the command line using Cmdline::GetSingleValue(), CmdLine::Call() or CmdLine::Done().
|
|
Error codes used with a CmdLineException:
|
|
||||||||||||
|
Command line exceptions are usually thrown by members of class CmdLine. If a user defined class is used with CmdLine::Call or CmdLine::GetSingleValue, then the user defined |
|
|
|
|
|
|
|
|
|
|
|
Translates the error code (given in the constructor) to an englisch error message. Informs the user which option the error occured with.
|
|
|
the error code. |
|
|
the error message constructed by what(). |
|
|
the command line option the error occurred with. |
1.2.16