Chapter 8: Debugging and Error Handling
97
Specifying the type as ANY causes the ColdFusion Application Server to catch internal
exceptions, memory allocation errors, and access violations, which you may not be
prepared to handle.
Applications can optionally use the CFTHROW tag to raise custom exceptions. Such
exceptions are caught with any of the following type specifications:
•
TYPE="custom_exception_type"
•
TYPE="APPLICATION
"
•
TYPE="ANY"
The custom_exception_type type designates the name of a user-defined type specified
with the CFTHROW tag.
An exception raised within a CFCATCH block cannot be handled by the CFTRY block
that immediately encloses the CFCATCH tag.
Exception Information in CFCATCH
Within a CFCATCH block, the active exception’s properties can be accessed as
variables:
Exception Property Variables
Property variable
Description
CFCATCH.TYPE
The exception’s type, returned as a string:
CFCATCH.MESSAGE
The exception’s diagnostic message, if one was
provided. If no diagnostic message is available, this is
an empty string.
CFCATCH.DETAIL
A detailed message from the CFML interpreter. This
message, which contains HTML formatting, can help to
determine which tag threw the exception.
CFCATCH.EXTENDEDINFO
A custom error message. This is returned only for
CFCATCH tags where
TYPE="APPLICATION"
or a
custom type.
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...