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

Get help faster and easier

New user?