cee::ug::Error

class Error

Error object for simple error management

Public Types

enum Code

Available error codes.

Values:

enumerator ERR_NOT_SET

Error not set

enumerator ERR_ABORTED_BY_USER

Aborted by user.

enumerator ERR_INCONSISTENT_DATA

Inconsistent data.

enumerator ERR_USER_DEFINED_MESSAGE

A user defined message.

enumerator ERR_FILE_NOT_FOUND

File not found.

enumerator ERR_FILE_OPEN

Error opening file

enumerator ERR_FILE_READ

Error reading file

enumerator ERR_FILE_UNSUPPORTED_FILE_TYPE

Unsupported file type. E.g. Not a VTF file.

enumerator ERR_FILE_INVALID_FORMAT

Internal errors in the file. File does not comply to the file specification.

enumerator ERR_VTFX_WRONG_PASSWORD

Wrong password for VTFx file.

Public Functions

Error()

Constructs an empty error object.

Code errorCode() const

Returns the error code.

void setErrorCode(Code errorCode)

Sets the error code.

Str userDefinedErrorMessage() const

Returns the user defined error message.

void setUserDefinedError(const Str &errorMessage)

Sets the a user defined message and sets the error code to ERR_USER_DEFINED_MESSAGE.

Public Static Functions

static void safeSetErrorCode(Error *errorObj, Code errorCode)

Safely sets the error code by first checking if errorObj is NULL.

static void safeSetUserDefinedError(Error *errorObj, const Str &errorMessage)

Safely sets the user defined error message by first checking if errorObj is NULL.