arg_router  1.4.0
C++ command line argument parsing and routing
arg_router::multi_lang_exception Class Reference

#include <arg_router/exception.hpp>

Inherits std::exception.

Public Member Functions

 multi_lang_exception (error_code ec) noexcept
 
 multi_lang_exception (error_code ec, const parsing::token_type &token)
 
 multi_lang_exception (error_code ec, vector< parsing::token_type > tokens) noexcept
 
error_code ec () const noexcept
 
const vector< parsing::token_type > & tokens () const noexcept
 

Detailed Description

Used internally by the library (and node developers) to indicate failure.

Rather than carry an error message, this exception type carries an error code that then maps to a translated message at runtime. The translated message is then put into a parse_exception and re-thrown in the root, so the user should never this exception type.

Definition at line 110 of file exception.hpp.

Constructor & Destructor Documentation

◆ multi_lang_exception() [1/3]

arg_router::multi_lang_exception::multi_lang_exception ( error_code  ec)
inlineexplicitnoexcept

Error code constructor.

Parameters
ecError code

Definition at line 117 of file exception.hpp.

◆ multi_lang_exception() [2/3]

arg_router::multi_lang_exception::multi_lang_exception ( error_code  ec,
const parsing::token_type token 
)
inline

Token constructor.

Parameters
ecError code
tokenToken that caused the error

Definition at line 124 of file exception.hpp.

◆ multi_lang_exception() [3/3]

arg_router::multi_lang_exception::multi_lang_exception ( error_code  ec,
vector< parsing::token_type tokens 
)
inlinenoexcept

Token list constructor.

Parameters
ecError code
tokensTokens that caused the error

Definition at line 133 of file exception.hpp.

Member Function Documentation

◆ ec()

error_code arg_router::multi_lang_exception::ec ( ) const
inlinenoexcept
Returns
Error code

Definition at line 140 of file exception.hpp.

◆ tokens()

const vector<parsing::token_type>& arg_router::multi_lang_exception::tokens ( ) const
inlinenoexcept
Returns
Token list

Definition at line 144 of file exception.hpp.


The documentation for this class was generated from the following file: