Sets a new description for the class object. The description is specified by Printf formatting sequences and by tags.
- Template Parameters
-
char_t | is a type of the description to be set which is either char or wchar_t . |
DescriptionFormatParams | Deduced types of additional arguments passed to the function to format the message. |
- Parameters
-
[in] | pTags | is a pointer to a vector (implemented as a raw block of memory) specifying tags to be replaced during the synthesis of the description. See the Chusov::String::AllocateAndFormatStringByTagsIndirectW function for the details. If the parameter defines <CODE> and/or <DESCRIPTION> tags, the definitions of the ones are ignored as they are reserved to specify an insertion location (within the resulting description) for a string hexadecimal representation of the errc value and the corresponding description respectively. |
[in] | cTags | is a size of the vector of tags, in elements. |
[in] | pszDescriptionFormat | is a constant pointer to a C string specifying a formatting string, together with the tags and the variable-argument list specifying a layout of the description. |
| formatting_params | is a set of additional arguments to be used for the Printf formatting. |
The function is a wrap around the ChsvCodeException::SetCodeAndDescription(code_t nCode, fn_t &&GetDescription, const String::TAG_DESCRIPTION_PARAM_W *restrict pTags, std::size_t cTags, std::va_list ap, const wchar_t *restrict lpszDescriptionFormat).
The tag formatting includes processing of tags specified by the pTags
vector as well as the defined by default <CODE> and <DESCRIPTION> tags. The default tags are processed even if the pTags
vector is empty or NULL
. The one cannot redefine the processing of the default tags in other way than just disabling it. To disable tag-processing use the SetDescription(noformat, const char_t*) overload.