GLG Toolkit, C / C++ API Library  Version 4.6

This group contains functions for custom error handling. More...

Detailed Description

This group contains functions for custom error handling.

Functions

void GlgError (GlgErrorType type, char *message)
 Displays error and information messages using the currently installed error handler. More...
 
GlgErrorHandler GlgSetErrorHandler (GlgErrorHandler new_handler)
 Replaces the GLG Toolkit error handler and returns the previous error handler. More...
 

Function Documentation

◆ GlgError()

void GlgError ( GlgErrorType  type,
char *  message 
)

Displays error and information messages using the currently installed error handler.

See GlgErrorType for details on how different message types are handled by the default error handler.

Parameters
typeSpecifies the type of the error message.
messageThe message to be displayed.

◆ GlgSetErrorHandler()

GlgErrorHandler GlgSetErrorHandler ( GlgErrorHandler  new_handler)

Replaces the GLG Toolkit error handler and returns the previous error handler.

Parameters
new_handlerSpecifies a new error handler, supplied by the user, to be called on an error condition. This does not include internal errors of the GLG Toolkit, if any are detected: they are still reported using the default handler.
Returns
The previous error handler.

The GLG default error handler installed by default emits an audio beep and logs error in the glg_error.log file, see glg_error.log for more information. On Linux/Unix, the error message is also printed to the console using stdout.

For more information about error handlers, see the Error Processing and Debugging section of the GLG Programming Reference Manual.