GLG Toolkit, Java Class Library  Version 4.6

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

Detailed Description

This group contains methods for custom error handling.

Functions

static void Error (GlgErrorType error_type, String message, Exception exception)
 Display an error message using the GLG error handler. More...
 
static GlgErrorHandler SetErrorHandler (GlgErrorHandler new_handler)
 Replaces the GLG Toolkit error handler and returns the previous error handler. More...
 

Function Documentation

◆ Error()

static void Error ( GlgErrorType  error_type,
String  message,
Exception  exception 
)
static

Display an error message using the GLG error handler.

Invokes a currently installed error handler to generate an error message. See GlgErrorType for details on how different message types are handled by the default error handler.

Parameters
error_type

Specifies an error type, may be one of the following:

messageThe message to be displayed.
exceptionAn optional exception that caused the error. If it is not null, it is used to extract additional information and an exact stack trace.

◆ SetErrorHandler()

static GlgErrorHandler SetErrorHandler ( GlgErrorHandler  new_handler)
static

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 emits an audio beep and logs the error in the Java console.

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