chsvlib
chsv helper source code

◆ SetLastChsvErrorInformation()

void Chusov::SetLastChsvErrorInformation ( unsigned long  nError,
const CErrorInfoImpl &  refErrorInfo 
)
noexcept

The function setting the last chsvlib error code and its description.

Template Parameters
CErrorInfoImplis a class implementing the description processing mechanism. There are two requirements for it:
  1. It must implement the IErrorInfo interface;
  2. It must implements the constructor of form CErrrorInfoImpl(OnErrorInfoFailture). This constructor should create default
    CErrrorInfoImpl object when it's normal initialization fails. The parameter can be ignored by the constructor as it is used to separate its declaration from the default constructor.
  3. It must also implement the public default and copy constructors.
Parameters
nErrorspecifies the chsvlib error code to be set.
refErrorInfospecifies an object of type CErrorInfoImpl implementing and holding an extra error description.
Warning
The function must not be used together with SetLastChsvErrorWC(chsverror_t nChsvError), SetLastChsvErrorInfoWC(chsverror_t nChsvError, unsigned long nWin32Error, errno_t nCError), GetLastChsvErrorWin32() or GetLastChsvErrorC() as it results to an undefined behavior including memory corruptions.
Remarks
Declared in chsverr.h.