MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 301

Developing coldfusion mx applications
Table of Contents

Advertisement

If an exception occurs in the first level of exception-handling code, the inner
can catch and handle it. (An exception in a
blocks at the same level as that block.)
ColdFusion always responds to the latest exception that gets raised. For example, if code in a
block causes an exception that gets handled by a
cftry
causes an exception that has no handler, ColdFusion will display the default error message for
the exception in the
If an exception occurs when the current tag is nested inside other tags, the CFML processor
checks the entire stack of open tags until it finds a suitable
reaches the end of the stack.
Use
with
cftry
cfcatch
application page, or based on diagnostic information.
The entire
tag, including all its
cftry
cannot put the
<cftry>
For cases when a
cfcatch
tag, as described in
cfrethrow
If an exception can be safely ignored, use a
<cfcatch Type = Database />
In particularly problematic cases, you might enclose an exception-prone tag in a specialized
combination of
cftry
Exception information in cfcatch blocks
Within the body of a
object. The following sections describe the object contents.
Standard cfcatch variables
The following table describes the variables that are available in most cfcatch blocks:
Property variable
cfcatch.Detail
cfcatch.ErrorCode
cfcatch.ExtendedInfo
cfcatch.Message
block, and you will not be notified of the original exception.
cfcatch
to handle exceptions based on their point of origin within an
cfcatch
start tag on one page and have the
block is not able to successfully handle an error, consider using the
"Using the cfrethrow tag" on page
and
tags to immediately isolate the tag's exceptions.
cfcatch
tag, the active exception's properties are available in a
cfcatch
Description
A detailed message from the CFML compiler. This message, which can
contain HTML formatting, can help to determine which tag threw the
exception.
The
cfcatch.Detail
the
exceptionVariable
The
tag can supply a value for this code through the
cfthrow
attribute. For
Type="Database"
.
cfcatch.SQLState
Otherwise, the value of
Custom error message information. This is returned only to
which the
attribute is
type
Otherwise, the value of
The exception's default diagnostic message, if one was provided. If no
diagnostic message is available, this is an empty string.
The
cfcatch.Message
statement
exceptionVariable
block cannot be handled by
cfcatch
cfcatch
cftry/cfcatch
tags, must be on a single ColdFusion page. You
</cftry>
tag with no body; for example:
cfcatch
value is available in the CFScript
parameter.
,
cfcatch.ErrorCode
cfcatch.ErrorCode
or a custom type.
Application
cfcatch.ExtendedInfo
value is included in the value of the CFScript
parameter.
Handling runtime exceptions with ColdFusion tags
cfcatch
cfcatch
block, and the
cfcatch
combination or
end tag on another page.
309.
cfcatch
statement as
cfcatch
errorCode
has the same value as
is the empty string.
cfcatch
is the empty string.
block
block
tags for
catch
301

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion mx

Table of Contents