chsvlib
chsv helper source code

◆ ExceptionWithGenericCode() [7/10]

ExceptionWithGenericCode ( code_t  nCode)
noexcept

Constructs an exception object with the specified error code. .

Parameters
[in]nCodeis an error code, the exception object is to be associated with.

The constructed exception is associated with the specified integral error code cast to the code_t type, which is a template parameter of the ExceptionWithGenericCode class. The constructor is used when no caller-defined description is required for the error code. Therefore, both Exception::What() or Exception::what() "what" methods will return unspecified (but valid) C string (which is wide or multibyte respectively) saying that the description is not specified.

See also
ExceptionWithGenericCode(code_t nCode, fn_t&& GetDescription);
ExceptionWithGenericCode(code_t nCode, fn_t&& GetDescription, const char_t* restrict lpszDescriptionFormat, DescriptionFormatParams... formatting_params);
ExceptionWithGenericCode(code_t nCode, const char_t* restrict lpszDescriptionFormat, DescriptionFormatParams... formatting_params).