chsvlib
chsv helper source code

◆ ChsvExceptionByChsvCode() [2/4]

void Chusov::Exceptions::ChsvExceptionByChsvCode ( chsverror_t  nCode)

Creates an instance of the ChsvCodeExceptionTempl class, bound with the specified chsvlib error code, and throws it as an exception.

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>.
Parameters
[in]nCodeis a chsvlib error code. If a value of the code corresponds to one of the errors defined in the chsverr.h header, the exception produced is a corresponding ChsvCodeExceptionTempl instantiation (see predefined exceptions). Otherwise, the produced exception is of the UnknownException type.