|
QSDK 1.1 Documentation |
Files | |
| file | utils.h |
Modules | |
| Collection classes | |
| Reference counting | |
| Abstract Data Types | |
| Thread Synchronisation | |
| Memory Management | |
| Logging | |
| Version | |
Compounds | |
| struct | Problem |
| struct | ResultListener |
| struct | ResultString |
| struct | UID |
Defines | |
| #define | ERROR_CODE(__subsys, __code) (0x80040000 + (__subsys << 8) + __code) |
| #define | WARNING_CODE(__subsys, __code) (0x00040000 + (__subsys << 8) + __code) |
Typedefs | |
| typedef unsigned int | Result |
Enumerations | |
| enum | StdResult { Success = 0, False = 1, Failure = 0x80000000, NotImplemented = 0x80000001, OutOfMemory = 0x80000002, InvalidArgument = 0x80000003, NoInterface = 0x80000004, FileNotFound = (0x80040000 + ( 0 << 8) + 1 ), FileReadError = (0x80040000 + ( 0 << 8) + 2 ), FileWriteError = (0x80040000 + ( 0 << 8) + 3 ), FileCorrupt = (0x80040000 + ( 0 << 8) + 4 ) } |
Functions | |
| bool | succeeded (Result res) |
| bool | failed (Result res) |
| Result | raiseError (Result res) |
| Result | lastError () |
| void | clearError () |
| void | setErrorSuppressed (Result res) |
| void | clearErrorSuppressed (Result res) |
| const char * | resultToString (Result res) |
| void | addResultListener (const ResultListener *) |
| void | removeResultListener (const ResultListener *) |
|
|
Construct a Utils::Result representing an error given a subsystem code and a unique error code within that subsystem.
|
|
|
Construct a Utils::Result representing a warning given a subsystem code and a unique warning code within that subsystem.
|
|
|
Many function methods return a status code that can be used to determine success or failure. Result codes are all represented by a 32-bit (Microsoft COM-compatible) unsigned integer, which is divided into a number of fields:
For software developed at Qube we subdivide the code field into two eight bit fields with the high eight bits of the code representing the Qube subsystem and the low eight bits the error code within that subsystem. For convenience, the macros ERROR_CODE(subsys, code) and WARNING_CODE(subsys, code) are provided for constructing error codes in this format.
|
|
|
Standard codes returned in a Result.
|
|
|
Add a listener to the list of object called when a runtime error is detected. |
|
|
Clear the last value recorded with raiseError(). This simply sets the value to
|
|
|
Indicate that errors of this type should no longer be suppressed. Error message and Utils::ResultListener will now be active for errors of this type. |
|
|
Return
|
|
|
Return the last value recorded with raiseError().
|
|
|
Record a result value. This value can be retrieved later if for some reason the value was not available.
|
|
|
Remove a listener from the list of object called when a runtime error is detected. |
|
|
Return a printable string describing a result value.
|
|
|
Indicate that errors of this type should not be reported. |
|
|
Return
|
|
|
|
Qube Software Limited © 2000-2004
|
|