Go to the source code of this file.
Classes | |
class | Status_t |
Class which encompasses a success or failure status across all error code value spaces. More... | |
Defines | |
#define | ERROR_CODE(error_code) ( static_cast<error_code_t>(error_code) ) |
#define | eERR_unknown_error ERROR_CODE(0xE0000000) |
#define | eERR_user_base ERROR_CODE(0xE0010000) |
#define | eERR_posix_error_base ERROR_CODE(0xEF000000) |
#define | DEFINE_USER_ERROR(error, string) |
Typedefs | |
typedef int32 | error_code_t |
#define ERROR_CODE | ( | error_code | ) | ( static_cast<error_code_t>(error_code) ) |
Macro used in conjunction with DEFINE_USER_ERROR to apply the proper error_code_t type to the definition of eERR_* constant definitions. This is because addition of a base error code to an error code offset results in an integer. It need only be used to define extended error codes. Extended error codes should begin with eERR_user_base.
Definition at line 47 of file UTStatus.h.
#define eERR_unknown_error ERROR_CODE(0xE0000000) |
Error constant for a generic, unknown error, beginning of the UT library error codes as defined in UTErrorCodes.h
Definition at line 61 of file UTStatus.h.
#define eERR_user_base ERROR_CODE(0xE0010000) |
Beginning of the user-defined error code value space.
Definition at line 64 of file UTStatus.h.
#define eERR_posix_error_base ERROR_CODE(0xEF000000) |
Beginning of the POSIX error code value space.
Definition at line 67 of file UTStatus.h.
#define DEFINE_USER_ERROR | ( | error, | |||
string | ) |
User-defined errors can be declared in a header using a series of:
#define eERR_sensible_name_for_the_error ERROR_CODE(eERR_user_base + N) DEFINE_USER_ERROR( eERR_sensible_name_for_the_error, "Sensible description of the error" )
where there is no overlap in N between the user errors which are defined. In order to register the error strings, somewhere in the project the following code should be created:
#include "UTDefineUserErrorsPre.h" #include (project error codes header) #include "UTDefineUserErrorsPost.h"
That would typically be done in a source file dedicated to registering the user-defined errors.
Definition at line 445 of file UTStatus.h.
typedef int32 error_code_t |
Used internally by Status_t to represent the fundamental status.
if error_code_t >= 0, indicates success, with the value optionally being considered an integer or boolean
if error_code_t < 0, indicates failure with system errors, UT internal errors, POSIX errors, or user-defined errors in a single integrated value space
Definition at line 40 of file UTStatus.h.