GLG Toolkit, JavaScript 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, Object 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,
Object  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 print additional information by converting it to string.

◆ 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. Use CreateGlgErrorHandler to create a custom error handler.
Returns
The previous error handler.

The GLG default error handler logs the error in the browser console. See ThrowExceptionOnError for additional debugging information.

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