Adobe ColdFusion 8

ColdFusion.setGlobalErrorHandler

Description

Specifies a function that gets called, in place of the ColdFusion AJAX default error handler, if an error occurs when using a ColdFusion AJAX feature.

Function syntax

ColdFusion.setGlobalErrorHandler(functionName)

History

ColdFusion 8: Added this function

Parameters

Parameter

Description

functionName

The name of the JavaScript function to execute when there is an error in ColdFusion AJAX code, such as a binding error. This function must take a single argument, the error message string.

Returns

This function does not return a value.

Usage

If the page that calls this function does not have any ColdFusion AJAX-based controls, you must use a cfajaximport tag on the page to ensure that the page includes the JavaScript definition for this function.

The global error handler displays information about errors that occur in ColdFusion AJAX features. The default global error handler displays an alert with the error message. You can use this function to create a custom global error handler, for example, to display a custom error window with additional information about your application.