A class template specifying a generic exception which has a corresponding integral error code.
More...
|
template<class char_t , class fn_t , class = decltype(std::declval<fn_t&&>()(std::declval<code_t>()))> |
| ExceptionWithGenericCode (code_t nCode, fn_t &&GetDescription, Exception::vararg_tag_t, const char_t *restrict lpszDescriptionFormat, std::va_list ap) noexcept |
| Constructs an exception object by a specified error code, a functor, mapping the code to a description text, a format string and parameters for the formatting as specified by the Chusov::String::Printf function. . More...
|
|
template<class char_t > |
| ExceptionWithGenericCode (code_t nCode, Exception::vararg_tag_t, const char_t *restrict lpszDescriptionFormat, std::va_list ap) noexcept |
| Constructs an exception object by a specified error code, a format string and Printf formatting parameters. . More...
|
|
template<class char_t , class fn_t , class = decltype(std::declval<fn_t>()(code_t())), class ... DescriptionFormatParams> |
| ExceptionWithGenericCode (code_t nCode, fn_t &&GetDescription, const char_t *restrict lpszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept |
| Constructs an exception object by a specified error code, a functor, mapping the code to a description text, a format string and parameters for the formatting as specified by the Chusov::String::Printf function. . More...
|
|
template<class char_t , class ... DescriptionFormatParams> |
| ExceptionWithGenericCode (code_t nCode, const char_t *restrict lpszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept |
| Constructs an exception object with a specified error code, a format string and parameters for the formatting as specified by the Chusov::String::Printf function. . More...
|
|
template<class char_t , class ... DescriptionFormatParams> |
| ExceptionWithGenericCode (code_t nCode, std::nullptr_t, const char_t *restrict lpszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept |
| Constructs an exception object with a specified error code, a format string and parameters for the formatting as specified by the Chusov::String::Printf function. . More...
|
|
template<class fn_t , class = decltype(std::declval<fn_t&&>()(std::declval<code_t>()))> |
| ExceptionWithGenericCode (code_t nCode, fn_t &&GetDescription) noexcept |
| Constructs an exception object by a specified error code and a functor, mapping the code to a textual description. More...
|
|
| ExceptionWithGenericCode (code_t nCode) noexcept |
| Constructs an exception object with the specified error code. . More...
|
|
template<class fn_t , class char_t , class traits_t , class alloc_t , class = decltype(std::declval<fn_t>()(code_t()))> |
| ExceptionWithGenericCode (code_t nCode, fn_t &&GetDescription, const std::basic_string< char_t, traits_t, alloc_t > &strDescriptionFormat) noexcept |
| Constructs an exception object by a specified error code, and an std::basic_string string object. . More...
|
|
template<class char_t , class traits_t , class alloc_t > |
| ExceptionWithGenericCode (code_t nCode, const std::basic_string< char_t, traits_t, alloc_t > &strDescriptionFormat) noexcept |
| Constructs an exception object by a specified error code, and a description provided by an std::basic_string object. . More...
|
|
template<class char_t , class traits_t , class alloc_t > |
| ExceptionWithGenericCode (code_t nCode, std::nullptr_t, const std::basic_string< char_t, traits_t, alloc_t > &strDescriptionFormat) noexcept |
| Constructs an exception object by a specified error code, and a description provided by an std::basic_string object. . More...
|
|
| ExceptionWithGenericCode (const ExceptionWithGenericCode &refRight)=default |
| Default copy constructor.
|
|
| ExceptionWithGenericCode (ExceptionWithGenericCode &&refRight)=default |
| Default move constructor.
|
|
code_t | Code () const noexcept |
| Returns an error code, the exception object is bound with.
|
|
| Exception ()=default |
| Construct a default exception object without specified description. The default description is a valid but unspecified C string.
|
|
template<class ... DescriptionFormatParams> |
| Exception (const char *restrict lpszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept |
| Constructs an exception object with an optional description, specified by Chusov::String::PrintfA formatting rules. More...
|
|
template<class ... DescriptionFormatParams> |
| Exception (const wchar_t *restrict lpszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept |
| Constructs an exception object with an optional description, specified by Chusov::String::PrintfW formatting rules. More...
|
|
| Exception (vararg_tag_t, const char *restrict lpszDescriptionFormat, std::va_list ap) noexcept |
| Constructs an exception object with an optional description, specified by Chusov::String::PrintfA formatting rules. More...
|
|
| Exception (vararg_tag_t, const wchar_t *restrict lpszDescriptionFormat, std::va_list ap) noexcept |
| Constructs an exception object with an optional description, specified by Chusov::String::PrintfW formatting rules. More...
|
|
template<class traits_t , class alloc_t > |
| Exception (const std::basic_string< char, traits_t, alloc_t > &strDescription) noexcept |
| Constructs an exception based on a textual description, represented as a multi-byte std::basic_string object. More...
|
|
template<class traits_t , class alloc_t > |
| Exception (const std::basic_string< wchar_t, traits_t, alloc_t > &strDescription) noexcept |
| Constructs an exception based on a textual description, represented as a wide std::basic_string object. More...
|
|
| Exception (const Exception &refRight)=default |
| Standard copy constructor.
|
|
| Exception (Exception &&ex)=default |
| Standard move constructor.
|
|
template<class StdExcept , class = std::enable_if_t<Implementation::is_std_except<StdExcept>::value>> |
| Exception (StdExcept &&ex) noexcept |
|
virtual | ~Exception () noexcept |
| A default destructor.
|
|
Exception & | operator= (const Exception &)=default |
| Standard copy assignment operator.
|
|
Exception & | operator= (Exception &&)=default |
| Standard move assignment operator.
|
|
virtual const char * | what () const noexcept |
| Returns a description, corresponding to the exception, represented as a multi-byte string constructed using the current locale.
|
|
virtual const wchar_t * | What () const noexcept |
| Returns a description, corresponding to the exception, represented as a wide string.
|
|
|
| ExceptionWithGenericCode ()=default |
| A default protected constructor of the exception object.
|
|
template<class char_t > |
auto | SetCodeAndDescription (code_t nCode, const char_t *lpszDescription) noexcept -> std::enable_if_t< std::is_integral< char_t >::value > |
| Sets a new error code and description without any formatting. More...
|
|
template<class char_t , class fn_t , class = decltype(std::declval<fn_t&&>()(std::declval<code_t>()))> |
auto | SetCodeAndDescription (code_t nCode, fn_t &&GetDescription, const String::TAG_DESCRIPTION_PARAM< char_t > *restrict pTags, std::size_t cTags, noprintf, const char_t *restrict lpszDescriptionFormat) noexcept -> std::enable_if_t< std::is_integral< char_t >::value, decltype(void(std::declval< fn_t && >()(std::declval< code_t >())))> |
| Sets a new exception description, according to the specified error code, formatting rules and a functor object mapping the error code to its default string description. . More...
|
|
template<class char_t , class fn_t , class = decltype(std::declval<fn_t&&>()(std::declval<code_t>()))> |
auto | SetCodeAndDescription (code_t nCode, fn_t &&GetDescription, const String::TAG_DESCRIPTION_PARAM< char_t > *restrict pTags, std::size_t cTags, Exception::vararg_tag_t, const char_t *restrict lpszDescriptionFormat, std::va_list ap) noexcept -> std::enable_if_t< std::is_integral< char_t >::value, decltype(void(std::declval< fn_t && >()(std::declval< code_t >())))> |
| Sets a new exception description, according to the specified error code, formatting rules (with custom tags), variadic list of parameters and a function object mapping the error code to its default string description. . More...
|
|
template<class char_t , class fn_t , class = decltype(std::declval<fn_t&&>()(std::declval<code_t>()))> |
auto | SetCodeAndDescription (code_t nCode, fn_t &&GetDescription, Exception::vararg_tag_t, const char_t *restrict lpszDescriptionFormat, std::va_list ap) noexcept -> std::enable_if_t< std::is_integral< char_t >::value, decltype(void(std::declval< fn_t && >()(std::declval< code_t >())))> |
| Sets a new exception description, according to the specified error code, formatting rules (without tag customization), variadic list of parameters and a function object mapping the error code to its default string description. More...
|
|
template<class char_t > |
auto | SetCodeAndDescription (code_t nCode, Exception::vararg_tag_t, const char_t *restrict lpszDescriptionFormat, std::va_list ap) noexcept -> std::enable_if_t< std::is_integral< char_t >::value > |
| Sets a new exception description, according to the specified error code, formatting rules (without tag customization), variadic list of parameters and a function object mapping the error code to its default string description. More...
|
|
template<class char_t , class fn_t , class ... DescriptionFormatParams> |
auto | SetCodeAndDescription (code_t nCode, fn_t &&GetDescription, const String::TAG_DESCRIPTION_PARAM< char_t > *restrict pTags, std::size_t cTags, const char_t *restrict lpszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept -> std::enable_if_t< std::is_integral< char_t >::value &&Chusov::String::is_valid_printf_type_set_v< DescriptionFormatParams... >, decltype(void(std::declval< fn_t && >()(std::declval< code_t >())))> |
| Sets a new exception description, according to the specified error code, formatting rules (with custom tags), formatting parameter pack and a functor object mapping the error code to its default string description. . More...
|
|
template<class char_t , class fn_t , class ... DescriptionFormatParams> |
auto | SetCodeAndDescription (code_t nCode, fn_t &&GetDescription, const char_t *restrict lpszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept -> std::enable_if_t< std::is_integral< char_t >::value &&Chusov::String::is_valid_printf_type_set_v< DescriptionFormatParams... >, decltype(void(std::declval< fn_t && >()(std::declval< code_t >())))> |
| Sets a new exception description, according to the specified error code, formatting rules (without tag customization), formatting parameter pack and a functor object mapping the error code to its default string description. More...
|
|
template<class char_t , class ... DescriptionFormatParams> |
auto | SetCodeAndDescription (code_t nCode, const char_t *restrict lpszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept -> std::enable_if_t< Chusov::String::is_valid_printf_type_set_v< DescriptionFormatParams... >> |
| Sets a new exception description, according to the specified error code, formatting rules (without tag customization), variadic list of parameters and a function object mapping the error code to its default string description. More...
|
|
void | SetWhat (wchar_t *lpszOwnedWhat) noexcept |
|
void | SetWhat (char *lpszOwnedWhat) noexcept |
|
template<class code_t = unsigned long, class = typename std::enable_if<std::is_integral<code_t>::value || std::is_enum<code_t>::value>::type>
class Chusov::Exceptions::ExceptionWithGenericCode< code_t, class >
A class template specifying a generic exception which has a corresponding integral error code.
- Template Parameters
-
code_t | is a type of an error code the class is to hold. The type must correspond to one of the standard integral types. |
- Examples
- chsvexception\nested_exceptions.cpp.