|
cli11
|
The exception hierarchy thrown by the library. More...
import cli11:string_tools;import std;Classes | |
| class | cli::error_t |
| Base of every exception the library throws. More... | |
| class | cli::detail::error_mixin_t< derived_t, base_t > |
| Supplies the constructor set every error type shares. More... | |
| class | cli::construction_error_t |
| Base of the errors reporting a mistake in how the parser was built. More... | |
| class | cli::incorrect_construction_t |
| An option was configured in a way that cannot work. More... | |
| class | cli::bad_name_string_t |
| An option, subcommand, or positional name was malformed. More... | |
| class | cli::option_already_added_t |
| A name collided with one already registered. More... | |
| class | cli::parse_error_t |
| Base of the errors reporting a problem with the command line. More... | |
| class | cli::success_t |
| Parsing finished early but successfully; the program should exit cleanly. More... | |
| class | cli::call_for_help_t |
| The help flag was given; print help and exit. More... | |
| class | cli::call_for_all_help_t |
| The expanded help flag was given; print full help and exit. More... | |
| class | cli::call_for_version_t |
| The version flag was given; print the version and exit. More... | |
| class | cli::runtime_error_t |
| The program requested a non-zero exit without a parsing problem. More... | |
| class | cli::file_error_t |
| A file could not be opened or read. More... | |
| class | cli::conversion_error_t |
| A value could not be converted to the option's target type. More... | |
| class | cli::validation_error_t |
| A value failed one of the option's validators. More... | |
| class | cli::required_error_t |
| A required option or subcommand was not supplied. More... | |
| class | cli::argument_mismatch_t |
| An option received the wrong number of values. More... | |
| class | cli::requires_error_t |
| An option was used without another it depends on. More... | |
| class | cli::excludes_error_t |
| Two mutually exclusive options were used together. More... | |
| class | cli::extras_error_t |
| Arguments remained on the command line after parsing finished. More... | |
| class | cli::config_error_t |
| A configuration file could not be parsed or applied. More... | |
| class | cli::invalid_error_t |
| The parser reached a state it cannot resolve. More... | |
| class | cli::horrible_error_t |
| An internal invariant was violated. More... | |
| class | cli::option_not_found_t |
| A lookup by name found no matching option. More... | |
Enumerations | |
| enum class | cli::exit_codes_t : int { success = 0 , incorrect_construction = 100 , bad_name_string , option_already_added , file_error , conversion_error , validation_error , required_error , requires_error , excludes_error , extras_error , config_error , invalid_error , horrible_error , option_not_found , argument_mismatch , base_class = 127 } |
| Process exit codes associated with each error type. More... | |
The exception hierarchy thrown by the library.
Everything derives from cli::error_t, which derives from std::runtime_error. The hierarchy splits into two branches:
Catch cli::parse_error_t in main and hand it to app_t::exit.
Each type carries a short name, reachable through cli::error_t::get_name, and a process exit code, reachable through cli::error_t::get_exit_code.
|
exportstrong |
Process exit codes associated with each error type.