MACROMEDIA COLFUSION MX 7-CFML Reference page 951

Cfml reference
Hide thumbs Also See for COLFUSION MX 7-CFML:
Table of Contents

Advertisement

onError
Description
Runs when an uncaught exception occurs in the application.
Syntax
<cffunction name="onError" returnType="void">
<cfargument name="Exception" required=true/>
<cfargument name="EventName" type="String" required=true/>
...
</cffunction>
See also
Method
summary, "Handling errors in Application.cfc" in ColdFusion MX Developer's Guide
Parameters
ColdFusion MX passes the following parameters to the method:
Parameter
Description
Exception
The ColdFusion MX Exception object. For information on the structure of this object,
see the description of the
EventName
The name of the event handler that generated the exception. If the error occurs
during request processing and you do not implement an
the empty string.
Returns
This method does not return a value; do not use the
Usage
Use this method to handle errors in an application-specific manner. This method overrides any
error handlers that you set in the ColdFusion MX Administrator or in
override try/catch blocks.
Whether the
onError
follows:
The
onError
onApplicationStart
event method, or while processing a request.
The
onError
onApplicationEnd
context; however, it can log an error message.
If the
event handler is triggered by a scope-specific event method, such as
onError
onSessionStart
scopes. An
onError
further processing in the session, but not in the application.
method can display output depends on where the error takes place, as
method can display a message to the user if an error occurs during an
,
onSessionStart
method cannot display output to the user if the error occurs during an
or
onSessionEnd
, the error prevents further processing at the level of that scope and any lower
event triggered by an
variable in the
cfcatch
cfreturn
,
onRequestStart
event method, because there is no available page
method, for example, prevents
onSessionStart
description.
cfcatch
method, this is
onRequest
tag.
tags. It does not
cferror
,
, or
onRequest
onRequestEnd
onError
951

Advertisement

Table of Contents
loading

This manual is also suitable for:

Colfusion mx 7 - installing and using coldfusion mx

Table of Contents