All Classes Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
gears::optparse::error Class Reference

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.

Public Member Functions

 error (const std::string &name, const std::string &str, const std::string &op)
 Constructs an exception. More...
 

Public Attributes

std::string program_name
 
std::string option_name
 
std::string error_string
 

Detailed Description

Definition at line 40 of file error.hpp.

Constructor & Destructor Documentation

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
nameThe name of the program.
strThe error string.
optThe option passed

Definition at line 55 of file error.hpp.