cli11
Loading...
Searching...
No Matches
cli::config_error_t Class Referenceexport
module cli11

A configuration file could not be parsed or applied. More...

Inheritance diagram for cli::config_error_t:
cli::detail::error_mixin_t< config_error_t, parse_error_t > cli::parse_error_t cli::detail::error_mixin_t< parse_error_t, error_t > cli::error_t

Public Member Functions

 config_error_t (std::string msg)
 Constructs the error with the default exit code.
Public Member Functions inherited from cli::detail::error_mixin_t< config_error_t, parse_error_t >
 error_mixin_t (std::string msg, exit_codes_t exit_code)
 Constructs the error, naming it from derived_t.
 error_mixin_t (std::string msg, int exit_code)
 Constructs the error, naming it from derived_t.
Public Member Functions inherited from cli::detail::error_mixin_t< parse_error_t, error_t >
 error_mixin_t (std::string msg, exit_codes_t exit_code)
 Constructs the error, naming it from derived_t.
 error_mixin_t (std::string msg, int exit_code)
 Constructs the error, naming it from derived_t.
Public Member Functions inherited from cli::error_t
auto get_exit_code () const -> int
 Returns the process exit code associated with this error.
auto get_name () const -> std::string
 Returns the short name of this error type.
 error_t (std::string name, std::string msg, int exit_code=static_cast< int >(exit_codes_t::base_class))
 Constructs an error with an explicit numeric exit code.
 error_t (std::string name, std::string msg, exit_codes_t exit_code)
 Constructs an error with an exit code drawn from exit_codes_t.

Static Public Member Functions

static auto extras (const std::string &item) -> config_error_t
 A configuration entry could not be parsed.
static auto not_configurable (const std::string &item) -> config_error_t
 A configuration entry named an option that may not be configured.

Static Public Attributes

static constexpr std::string_view error_type_name = "config_error"
 Short name reported by error_t::get_name.
Static Public Attributes inherited from cli::parse_error_t
static constexpr std::string_view error_type_name = "parse_error"
 Short name reported by error_t::get_name.

Additional Inherited Members

Protected Member Functions inherited from cli::detail::error_mixin_t< config_error_t, parse_error_t >
 error_mixin_t (std::string ename, std::string msg, int exit_code)
 Forwards an explicit type name, for further derivation.
 error_mixin_t (std::string ename, std::string msg, exit_codes_t exit_code)
 Forwards an explicit type name, for further derivation.
Protected Member Functions inherited from cli::detail::error_mixin_t< parse_error_t, error_t >
 error_mixin_t (std::string ename, std::string msg, int exit_code)
 Forwards an explicit type name, for further derivation.
 error_mixin_t (std::string ename, std::string msg, exit_codes_t exit_code)
 Forwards an explicit type name, for further derivation.

Detailed Description

A configuration file could not be parsed or applied.

Constructor & Destructor Documentation

◆ config_error_t()

cli::config_error_t::config_error_t ( std::string msg)
inlineexplicit

Constructs the error with the default exit code.

Parameters
msgHuman-readable description.

Member Function Documentation

◆ extras()

auto cli::config_error_t::extras ( const std::string & item) -> config_error_t
inlinestaticnodiscard

A configuration entry could not be parsed.

Parameters
itemThe entry that failed.
Returns
The constructed error.

◆ not_configurable()

auto cli::config_error_t::not_configurable ( const std::string & item) -> config_error_t
inlinestaticnodiscard

A configuration entry named an option that may not be configured.

Parameters
itemThe offending entry.
Returns
The constructed error.

The documentation for this class was generated from the following file:
  • /home/mccakit/desktop/repositories/cli11/src/error.cpp