The base exception thrown in case of errors.
Inherits runtime_error.
Inherited by gears::optparse::missing_required_option, gears::optparse::missing_required_value, gears::optparse::option_takes_no_value, and gears::optparse::unrecognised_option.
|
| error (const std::string &name, const std::string &str, const std::string &op) |
| Constructs an exception. More...
|
|
|
std::string | program_name |
|
std::string | option_name |
|
std::string | error_string |
|
Definition at line 40 of file error.hpp.
gears::optparse::error::error |
( |
const std::string & |
name, |
|
|
const std::string & |
str, |
|
|
const std::string & |
op |
|
) |
| |
|
inline |
Constructs an exception with the string "{name}: error: {str}"
. This is usually not thrown directly, but rather by its inherited exception objects.
- Parameters
-
name | The name of the program. |
str | The error string. |
opt | The option passed |
Definition at line 55 of file error.hpp.