chsvlib
chsv helper source code

◆ ChsvCodeExceptionTempl() [3/4]

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. .

Template Parameters
char_tis a type of the description to be set which is either char or wchar_t.
DescriptionFormatParamsDeduced types of additional arguments passed to the function to format the message.
Parameters
formatting_paramsis a list of additional parameters given with respect to the format string in order to generate the description. See Chusov::String::Printf for the formatting rules.
pszUserDescriptionis a zero-terminated string specifying the formatting sequences defining the exception description, to be returned by the What or the what methods. The formatting rules are the same as the ones, specified for the Chusov::String::Printf function. The <DESCRIPTION> tag may also be specified in the formatting string to be replaced by the string, which is returned by the Chusov::ChsvErrorDescriptionW function.