GLG Toolkit, JavaScript Library  Version 4.6
GlgErrorHandler Interface Reference

A custom error handler object. More...

Detailed Description

A custom error handler object.

A custom error handler can be installed via SetErrorHandler to provide custom error message processing.

Use CreateGlgErrorHandler to create an error handler.

Public Member Functions

void Error (String message, GlgErrorType error_type, Object e)
 Custom error handling method. More...
 

Static Public Member Functions

static GlgErrorHandler CreateGlgErrorHandler (function error_handler_func)
 Constructor. More...
 

Member Function Documentation

◆ CreateGlgErrorHandler()

static GlgErrorHandler CreateGlgErrorHandler ( function  error_handler_func)
static

Constructor.

Creates an error handler that can be used as a parameter of the SetErrorHandler method. The static method is invoked on the GLG Toolkit handle obtained via a 'new GlgToolkit()' call at the application start-up.

Parameters
error_handler_funcA custom error handler function to be invoked when an error occurs. The function's type signature must match the type signature of the Error method.
Returns
An opaque internal object representing GlgErrorHandler.

◆ Error()

void Error ( String  message,
GlgErrorType  error_type,
Object  e 
)

Custom error handling method.

This method is invoked with a diagnostic message when an error occurs.

Parameters
messageError description
error_typeSpecifies an error type, see GlgErrorType.
eAn optional exception that caused the error. If it is not null, it may be used to extract additional information about the error.