HErrorManager

class HErrorManager

The HErrorManager class handles all the error messaging in MVO.

Methods

static void HErrorManager::Init()

static

This method initialized the error and suppression lists as well as registers the callback that handles errors that are generated by the HOOPS database.

static void HErrorManager::Cleanup()

static

This method cleans up the error and suppression list and unregisters all callbacks.

static void HErrorManager::BeginErrorIteration()

static

This method prepares the error handler for iteration through the error list. Call this method before making calls to GetNextError.

static HErrorNode *HErrorManager::GetNextError()

static

Returns

A pointer to the next error message in the error list.
static HErrorNode *HErrorManager::GetLastError()

static

Returns

A pointer to the last error message that was generated.
static void HErrorManager::DeleteLastError()

static

This method remove the last error message from the error list and deletes it.

static void HErrorManager::ShowAllErrors()

static

This method iterates through all the messages the error list and displays them to the user.

static void HErrorManager::SpoolUpdateErrors()

static

This method iterates through the update error list which holds errors associated with #HC_Update_Display and adds those errors that should not be suppress to the main error list. Note that no errors messages can be displayed during an update. Call this method after an update has occurred to ensure that an errors that were generated during an update will be displayed.

static void HErrorManager::SetErrorCallback(void (*err)(HErrorNode*, void*), void *user_data)

static

This method sets the event checker callback.

static void HErrorManager::SuppressError(int severity, int category, int specific)

static

This method takes a given the severity, category and specific and uses this combination to suppress errors that have the corresponding values.

Parameters

severity: An integer that defines the seriousness of the error as described in #HC_Define_Error_Handler.

categeory: An integer that dentifies the general category the error belongs to as described in #HC_Define_Error_Handler. For example, memory errors fall in the HEC_MEMORY error category.

specific: An integer that identifies the specific error under the category already defined as described in #HC_Define_Error_Handler. For example, running out of memory, HES_OUT_OF_MEMORY, is a specific memory error in the HEC_MEMORY category.

static void HErrorManager::Flush()

static

This method removes all the errors from the mail error list and the update error list.

static void HErrorManager::SetShowDialog(bool s)

static

This method sets the show dialog member variable.

Parameters

s: Pass true to show the error dialor or false not to show it.
static void HErrorManager::SetSpoolUpdateErrors(bool s)

static

This method had not been implemented yet.

static bool HErrorManager::GetShowDialog()

static

Returns

True if HOOPS will show an error dialog or false if it will not.
static void HErrorManager::AllowAllErrors()

static

This method sets the system option to turn on all error, warning and information messages. It also clear the suppress errors list.

static bool HErrorManager::GetDialogRunning()

static

Returns

True if the error dialog is currently running or false if it isn’t.
static void HErrorManager::CallbackEntryPoint(int category, int specific, int severity, int msgc, char const *msgv[], int stackc, char const *stackv[])

static

This is the callback function that handles the errors that are generated putting the in the correct error list. Note that when Update errors are received they are not immediately put in the error list and displayed. They are put in an update error list because error messages cannot be displayed while an update is occurring. When the update is finished, call SpoolUpdateError to move the update errors into the main error list to be displayed.

Parameters

severity: An integer that defines the seriousness of the error as described in #HC_Define_Error_Handler.

categeory: An integer that dentifies the general category the error belongs to as described in #HC_Define_Error_Handler. For example, memory errors fall in the HEC_MEMORY error category.

specific: An integer that identifies the specific error under the category already defined as described in #HC_Define_Error_Handler. For example, running out of memory, HES_OUT_OF_MEMORY, is a specific memory error in the HEC_MEMORY category.

msgc: The length of the msgv array.

msgv: An array of pointers to a list of messages.

stackc: The length of stackv.

stackv: An array of strings that indicates the list of methods that were called. The last being the currently active HOOPS routine and the first being the originating function.

Variables

struct vlist_s *HErrorManager::m_ErrorList

private static

struct vlist_s
struct vlist_s *HErrorManager::m_UpdateErrorList

private static

struct vlist_s
struct vlist_s *HErrorManager::m_SuppressList

private static

struct vlist_s
void (*HErrorManager::m_pfError)(HErrorNode*, void*)

private static

void(

A pointer to an event checker function

void *HErrorManager::m_UserData

private static

void
bool *HErrorManager::m_ErrorClass

private static

bool
bool HErrorManager::m_bShowDialog

private static

bool
bool HErrorManager::m_bDialogRunning

private static

bool
bool HErrorManager::m_bBlocked

private static

bool
bool HErrorManager::m_bInterrupted

private static

bool
bool HErrorManager::m_bSpoolUpdateErrors

private static

bool