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

An option was configured in a way that cannot work. More...

Inheritance diagram for cli::incorrect_construction_t:
cli::detail::error_mixin_t< incorrect_construction_t, construction_error_t > cli::construction_error_t cli::detail::error_mixin_t< construction_error_t, error_t > cli::error_t

Public Member Functions

 incorrect_construction_t (std::string msg)
 Constructs the error with the default exit code.
Public Member Functions inherited from cli::detail::error_mixin_t< incorrect_construction_t, construction_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< construction_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 positional_flag (const std::string &name) -> incorrect_construction_t
 A flag was declared as a positional.
static auto set_0_opt (const std::string &name) -> incorrect_construction_t
 An option was told to expect zero values.
static auto set_flag (const std::string &name) -> incorrect_construction_t
 A flag was given an expected value count.
static auto change_not_vector (const std::string &name) -> incorrect_construction_t
 A non-vector option was given a variable value count.
static auto after_multi_opt (const std::string &name) -> incorrect_construction_t
 The expected count was changed after the multi-option policy.
static auto missing_option (const std::string &name) -> incorrect_construction_t
 A named option does not exist.
static auto multi_option_policy (const std::string &name) -> incorrect_construction_t
 A multi-option policy was applied where it cannot work.

Static Public Attributes

static constexpr std::string_view error_type_name = "incorrect_construction"
 Short name reported by error_t::get_name.
Static Public Attributes inherited from cli::construction_error_t
static constexpr std::string_view error_type_name = "construction_error"
 Short name reported by error_t::get_name.

Additional Inherited Members

Protected Member Functions inherited from cli::detail::error_mixin_t< incorrect_construction_t, construction_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< construction_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

An option was configured in a way that cannot work.

Constructor & Destructor Documentation

◆ incorrect_construction_t()

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

Constructs the error with the default exit code.

Parameters
msgHuman-readable description.

Member Function Documentation

◆ after_multi_opt()

auto cli::incorrect_construction_t::after_multi_opt ( const std::string & name) -> incorrect_construction_t
inlinestaticnodiscard

The expected count was changed after the multi-option policy.

Parameters
nameThe offending option name.
Returns
The constructed error.

◆ change_not_vector()

auto cli::incorrect_construction_t::change_not_vector ( const std::string & name) -> incorrect_construction_t
inlinestaticnodiscard

A non-vector option was given a variable value count.

Parameters
nameThe offending option name.
Returns
The constructed error.

◆ missing_option()

auto cli::incorrect_construction_t::missing_option ( const std::string & name) -> incorrect_construction_t
inlinestaticnodiscard

A named option does not exist.

Parameters
nameThe name that was looked up.
Returns
The constructed error.

◆ multi_option_policy()

auto cli::incorrect_construction_t::multi_option_policy ( const std::string & name) -> incorrect_construction_t
inlinestaticnodiscard

A multi-option policy was applied where it cannot work.

Parameters
nameThe offending option name.
Returns
The constructed error.

◆ positional_flag()

auto cli::incorrect_construction_t::positional_flag ( const std::string & name) -> incorrect_construction_t
inlinestaticnodiscard

A flag was declared as a positional.

Parameters
nameThe offending option name.
Returns
The constructed error.

◆ set_0_opt()

auto cli::incorrect_construction_t::set_0_opt ( const std::string & name) -> incorrect_construction_t
inlinestaticnodiscard

An option was told to expect zero values.

Parameters
nameThe offending option name.
Returns
The constructed error.

◆ set_flag()

auto cli::incorrect_construction_t::set_flag ( const std::string & name) -> incorrect_construction_t
inlinestaticnodiscard

A flag was given an expected value count.

Parameters
nameThe offending option name.
Returns
The constructed error.

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