#include <utils.h>
Classes | |
struct | ErrorEvent |
Groups together information pertinent to one error occurrence. More... | |
Public Types | |
enum | eErrorType { ErrorType_Assert, ErrorType_Params, ErrorType_Instance, ErrorType_Internal, ErrorType_Unknown } |
Defines known/common error types. More... | |
Static Public Member Functions | |
static void | Start (int a_nErrorHeapSize) |
Starts error management services You must call this function BEFORE any other error function. | |
static void | Stop () |
Stops error management services You must call this function right before your program ends. | |
static void | Report (eErrorType a_nType, EclipseObject *a_pObject, const char *a_sDsc,...) |
Reports an error in our heap If an object is passed, its reference count will increase by 1. | |
static int | GetErrorCount () |
Returns the current number of active errors in the heap. | |
static void | Clear () |
Clears our error heap Deletes all the errors contained in our heap and all their intermediate data. | |
static ErrorEvent * | GetError (int a_nIndex) |
Access a particular error from our heap Returns an error object from our heap, or null if the index is unknown. |
A static utility for reporting global errors.
It just tracks the last n error messages, and the objects that generated them. At any point in time you can check to see if someone raised the error flag, and then access the offending objects.
Definition at line 57 of file utils.h.
Defines known/common error types.
static ErrorEvent* Utils::ErrorManager::GetError | ( | int | a_nIndex | ) | [static] |
Access a particular error from our heap Returns an error object from our heap, or null if the index is unknown.
If the index is greater than the number of errors in the heap, the last valid error is returned.
a_nIndex | zero-based index for our heap. |
static int Utils::ErrorManager::GetErrorCount | ( | ) | [static] |
Returns the current number of active errors in the heap.
static void Utils::ErrorManager::Report | ( | eErrorType | a_nType, | |
EclipseObject * | a_pObject, | |||
const char * | a_sDsc, | |||
... | ||||
) | [static] |
Reports an error in our heap If an object is passed, its reference count will increase by 1.
a_nType | Error classification | |
a_pObject | The object where the error takes place. | |
a_sDesc | A brief description of the error, followed by any formatting params |
static void Utils::ErrorManager::Start | ( | int | a_nErrorHeapSize | ) | [static] |
Starts error management services You must call this function BEFORE any other error function.
a_nErrorHeapSize | Size of the error heap (number of error messages to keep) |