chsvlib
chsv helper source code

◆ ChsvExceptionByChsvCode() [1/4]

void Chusov::Exceptions::ChsvExceptionByChsvCode ( )

Constructs and throws an exception object by a chsvlib error code returned by the GetLastChsvError function.

Template Parameters
fProcessSuccessCodeAsUnknownErroris a flag specifying if the success code should be processed as an unknown error. That means that if the flag is set, and a value of the error code is CHSVERROR_SUCCESS, then the thrown exception is UnknownException. Otherwise, it is ChsvCodeExceptionTempl<CHSVERROR_SUCCESS>.

The function retrieves a chsvlib error code, returned by the GetLastChsvError function, and constructs the corresponding an exception object, which is thrown. The exception has a description, which is returned by Chusov::Exceptions::Exception::what() "what" or Exception::What() methods, retrieved by a call to the ChsvErrorDescriptionW function during the construction.

See also
ChsvExceptionByChsvCode(chsverror_t nCode);
ChsvExceptionByChsvCode(chsverror_t nCode, In_z const wchar_t* RESTRICT pszDescription, DescriptionFormatParams... formatting_params);
ChsvExceptionByChsvCode(chsverror_t nCode, std::va_list ap, In_z const wchar_t* RESTRICT pszDescription).