Insufficient buffer exception. More...
#include <chsvexception.h>
Public Member Functions | |
InsufficientBufferException () noexcept | |
A default constructor of the exception object. | |
template<class char_t > | |
InsufficientBufferException (Exception::vararg_tag_t, const char_t *restrict pszUserDescription, std::va_list ap) noexcept | |
A constructor of the exception object with a description defined by Printf format specifications and by a list of corresponding additional parameters. Also, <CODE> and <DESCRIPTION> tags are replaced by a hexadecimal representation of the error code and by a description returned by the ChsvErrorDescriptionW function. More... | |
template<class char_t , class ... DescriptionFormatParams> | |
InsufficientBufferException (const char_t *restrict pszUserDescription, DescriptionFormatParams ... formatting_params) noexcept | |
A constructor of the exception object with a description defined by Printf format specifications and by a list of corresponding additional parameters. Also, <CODE> and <DESCRIPTION> tags are replaced by a hexadecimal representation of the error code and by a description returned by the ChsvErrorDescriptionW function. More... | |
template<class char_t , class traits_t , class alloc_t > | |
InsufficientBufferException (const std::basic_string< char_t, traits_t, alloc_t > &strDescription) noexcept | |
Constructs an exception object with a description given by an std::basic_string wide string object. Unlike other constructors, the current one does not perform any kind of formatting and the string specified by the parameter is assigned as a description "as-is". More... | |
virtual const char * | what () const noexcept |
Returns a description, corresponding to the exception, represented as a multibyte string constructed using the current locale. | |
![]() | |
ChsvCodeExceptionTempl () noexcept | |
ChsvCodeExceptionTempl (Exception::vararg_tag_t, const char_t *restrict pszUserDescription, std::va_list ap) noexcept | |
Constructs an exception object of the specified (by class template parameter) type. The description, the constructed object is associated with, is constructed as specified using the format string and additional parameters, as specified by the Chusov::String::Printf function. Also, the <DESCRIPTION> tag can be specified in the format string to be changed by the string returned by the Chusov::ChsvErrorDescriptionW function for the error code. . More... | |
ChsvCodeExceptionTempl (const char_t *restrict pszUserDescription, DescriptionFormatParams ... formatting_params) noexcept | |
Constructs an exception object of the specified (by the class template parameter) type. The description, the constructed object is associated with, is constructed as specified using the format string and additional parameters, as specified by the Chusov::String::Printf function. Also, the <DESCRIPTION> tag can be specified in the format string to be changed by the string returned by the Chusov::ChsvErrorDescriptionW function for the error code. . More... | |
ChsvCodeExceptionTempl (const std::basic_string< char_t, traits_t, alloc_t > &strDescription) noexcept | |
Constructs an exception object with the description copied directly from a value of std::basic_string object, without any formatting. If the string is empty, the constructed exception description is a value returned by the Chusov::ChsvErrorDescriptionW function. . More... | |
ChsvCodeExceptionTempl (const ChsvCodeExceptionTempl &)=default | |
A standard copy constructor. | |
ChsvCodeExceptionTempl (ChsvCodeExceptionTempl &&rr)=default | |
A standard move constructor. | |
![]() | |
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 wchar_t * | What () const noexcept |
Returns a description, corresponding to the exception, represented as a wide string. | |
Additional Inherited Members | |
![]() | |
typedef chsverror_t | code_t |
A type alias for an error code type. | |
![]() | |
enum | vararg_tag_t { vararg_tag } |
![]() | |
static const char_t * | get_description (code_t nErr) noexcept |
A unary function wrapped around the Chusov::ChsvErrorDescription function in order for the latter to be provided as a function object mapping an integral error code to a string description to replace <DESCRIPTION> tags during by-tag formatting of an exception description. More... | |
![]() | |
enum class | DoNotConstruct |
A type of the parameter of the protected ChsvCodeExceptionTempl(DoNotConstruct) constructor. | |
![]() | |
void | SetDescription (noformat, const char_t *pszDescription) noexcept |
Sets a new description for the class object. The description is bound to the exception without any formatting. More... | |
void | SetDescription (const Chusov::String::TAG_DESCRIPTION_PARAM< char_t > *restrict pTags, std::size_t cTags, Exception::vararg_tag_t, const char_t *restrict pszDescriptionFormat, std::va_list ap) noexcept |
Sets a new description for the class object. The description is specified by Printf formatting sequences and by tags. More... | |
void | SetDescription (const Chusov::String::TAG_DESCRIPTION_PARAM< char_t > *restrict pTags, std::size_t cTags, const char_t *restrict pszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept |
Sets a new description for the class object. The description is specified by Printf formatting sequences and by tags. More... | |
auto | SetDescription (Exception::vararg_tag_t, const char_t *restrict pszDescriptionFormat, std::va_list ap) noexcept -> std::enable_if_t< std::is_integral< char_t >::value > |
Sets a result of the Printf formatting as a new description for the exception object. More... | |
auto | SetDescription (const char_t *restrict pszDescriptionFormat, DescriptionFormatParams ... formatting_params) noexcept -> std::enable_if_t< std::is_integral< char_t >::value > |
Sets a result of the Printf formatting as a new description for the exception object. More... | |
void | SetDescription () |
Sets the default description for the exception object stating that textual definition, which is returned by what method is unspecified. | |
ChsvCodeExceptionTempl (DoNotConstruct) | |
A constructor that does not do anything except for calling default constructors for the parent class. It is used to avoid unnecessary operations performed by the default constructor, and to let the inheritors of the class instance to call the ExceptionWithGenericCode::SetCodeAndDescription method to construct the description. . | |
![]() | |
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 char_t > | |
static const char_t * | GetDefaultDescription (code_t) noexcept |
A default function object as a stub for methods that do not specify user-defined functors. It maps any integral code to a NULL description. More... | |
Insufficient buffer exception.