Error object for simple error management More...
Public Types | |
enum | Code { ERR_NOT_SET, ERR_ABORTED_BY_USER, ERR_INCONSISTENT_DATA, ERR_USER_DEFINED_MESSAGE, ERR_FILE_NOT_FOUND, ERR_FILE_OPEN, ERR_FILE_READ, ERR_FILE_UNSUPPORTED_FILE_TYPE, ERR_FILE_INVALID_FORMAT, ERR_VTFX_WRONG_PASSWORD } |
Available error codes. More... | |
Public Member Functions | |
Error () | |
Constructs an empty error object. More... | |
Code | errorCode () const |
Returns the error code. More... | |
void | setErrorCode (Code errorCode) |
Sets the error code. More... | |
Str | userDefinedErrorMessage () const |
Returns the user defined error message. More... | |
void | setUserDefinedError (const Str &errorMessage) |
Sets the a user defined message and sets the error code to ERR_USER_DEFINED_MESSAGE. More... | |
Static Public Member Functions | |
static void | safeSetErrorCode (Error *errorObj, Code errorCode) |
Safely sets the error code by first checking if errorObj is NULL. More... | |
static void | safeSetUserDefinedError (Error *errorObj, const Str &errorMessage) |
Safely sets the user defined error message by first checking if errorObj is NULL. More... | |
Error object for simple error management
enum cee::ug::Error::Code |
Available error codes.
cee::ug::Error::Error | ( | ) |
Constructs an empty error object.
Error::Code cee::ug::Error::errorCode | ( | ) | const |
Returns the error code.
Safely sets the error code by first checking if errorObj is NULL.
Safely sets the user defined error message by first checking if errorObj is NULL.
void cee::ug::Error::setErrorCode | ( | Code | errorCode | ) |
Sets the error code.
void cee::ug::Error::setUserDefinedError | ( | const Str & | errorMessage | ) |
Sets the a user defined message and sets the error code to ERR_USER_DEFINED_MESSAGE.
Str cee::ug::Error::userDefinedErrorMessage | ( | ) | const |
Returns the user defined error message.