![]() |
Home | Libraries | People | FAQ | More |
boost::program_options::error_with_option_name
// In header: <boost/program_options/errors.hpp> class error_with_option_name : public { public: // construct/copy/destruct (, = "", = "", = ); ~(); // public member functions (, ); (, , ); (, , ); (); (); () ; (); () ; // protected member functions () ; (, ) ; () ; () ; // public data members ; };
Base class for most exceptions in the library.
Substitutes the values for the parameter name placeholders in the template to create the human readable error message
Placeholders are surrounded by % signs: example% Poor man's version of boost::format
If a parameter name is absent, perform default substitutions instead so ugly placeholders are never left in-place.
Options are displayed in "canonical" form This is the most unambiguous form of the parsed option name and would correspond to option_description::format_name() i.e. what is shown by print_usage()
The "canonical" form depends on whether the option is specified in short or long form, using dashes or slashes or without a prefix (from a configuration file)
error_with_option_name
public member functions( parameter_name, value);
Substitute parameter_name->value to create the error message from the error template
( parameter_name, from, to);
If the parameter is missing, then make the from->to substitution instead
( option_name, original_token, option_style);
Add context to an exception
( option_style);
( option_name);
Overridden in error_with_no_option_name
() ;
( original_token);
() ;
Creates the error_message on the fly Currently a thin wrapper for substitute_placeholders()