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

An option, subcommand, or positional name was malformed. More...

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

Public Member Functions

 bad_name_string_t (std::string msg)
 Constructs the error with the default exit code.
Public Member Functions inherited from cli::detail::error_mixin_t< bad_name_string_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 one_char_name (const std::string &name) -> bad_name_string_t
 A single-character name was not valid.
static auto missing_dash (const std::string &name) -> bad_name_string_t
 A long name was given only one leading dash.
static auto bad_long_name (const std::string &name) -> bad_name_string_t
 A long name contained invalid characters.
static auto bad_positional_name (const std::string &name) -> bad_name_string_t
 A positional name contained invalid characters.
static auto reserved_name (const std::string &name) -> bad_name_string_t
 A reserved name was used.
static auto multi_positional_names (const std::string &name) -> bad_name_string_t
 More than one positional name was supplied.

Static Public Attributes

static constexpr std::string_view error_type_name = "bad_name_string"
 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< bad_name_string_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, subcommand, or positional name was malformed.

Constructor & Destructor Documentation

◆ bad_name_string_t()

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

Constructs the error with the default exit code.

Parameters
msgHuman-readable description.

Member Function Documentation

◆ bad_long_name()

auto cli::bad_name_string_t::bad_long_name ( const std::string & name) -> bad_name_string_t
inlinestaticnodiscard

A long name contained invalid characters.

Parameters
nameThe offending name.
Returns
The constructed error.

◆ bad_positional_name()

auto cli::bad_name_string_t::bad_positional_name ( const std::string & name) -> bad_name_string_t
inlinestaticnodiscard

A positional name contained invalid characters.

Parameters
nameThe offending name.
Returns
The constructed error.

◆ missing_dash()

auto cli::bad_name_string_t::missing_dash ( const std::string & name) -> bad_name_string_t
inlinestaticnodiscard

A long name was given only one leading dash.

Parameters
nameThe offending name.
Returns
The constructed error.

◆ multi_positional_names()

auto cli::bad_name_string_t::multi_positional_names ( const std::string & name) -> bad_name_string_t
inlinestaticnodiscard

More than one positional name was supplied.

Parameters
nameThe surplus name.
Returns
The constructed error.

◆ one_char_name()

auto cli::bad_name_string_t::one_char_name ( const std::string & name) -> bad_name_string_t
inlinestaticnodiscard

A single-character name was not valid.

Parameters
nameThe offending name.
Returns
The constructed error.

◆ reserved_name()

auto cli::bad_name_string_t::reserved_name ( const std::string & name) -> bad_name_string_t
inlinestaticnodiscard

A reserved name was used.

Parameters
nameThe offending name.
Returns
The constructed error.

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