GLG Toolkit, JavaScript Library  Version 4.2
GlgErrorHandler Class Reference

Detailed Description

A custom error handler object used as a parameter of the GlgObject::SetErrorHandler method.

Public Member Functions

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

Static Public Member Functions

static GlgErrorHandler CreateGlgErrorHandler (function error_handler_func)

Member Function Documentation

◆ CreateGlgErrorHandler()

static GlgErrorHandler CreateGlgErrorHandler ( function  error_handler_func)

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

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.
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.

messageError description
error_typeSpecifies an error handling action to perform.
eAn optional exception that caused the error. If it is not null, it may used to extract additional information about the error.