Adobe COLDFUSION 9 Manual page 285

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Compiler exception errors
If ColdFusion encounters a compiler exception, how it handles the exception depends on whether the error occurs on
a requested page or on an included page:
• If the error occurs on a page that is accessed by a
you access using the cf_ notation, ColdFusion handles it as a runtime exception in the page that accesses the tag.
For a description of how these errors are handled, see the next section, "
• If the error occurs directly on the requested page, and the Administrator Settings Site-wide Error Handler field
specifies an error handler page, ColdFusion displays the specified error page. Otherwise, ColdFusion reports the
error using the standard error message format described in
page 280.
Runtime exception errors
If ColdFusion encounters a runtime exception, it does the action for the first matching condition in the following table:
Condition
The code with the error is inside a cftry tag and the exception type is
specified in a
tag.
cfcatch
The ColdFusion application has an Application.cfc with an onError
method
A
tag specifies an exception error handler for the exception
cferror
type.
The Administrator Settings Site-wide Error Handler field specifies an
error handler page.
A
tag specifies a Request error handler.
cferror
The default case.
For example, if an exception occurs in CFML code that is not in a
method, but a
onError
cferror
Error messages and the standard error format
If your application does not handle an error, ColdFusion displays a diagnostic message in the user's browser.
Error information is also written to a log file for later review. (For information on error logging, see
with the cflog
tag" on page 285.)
The standard error format consists of the information listed in the following table. ColdFusion does not always display
all sections.
cfinclude
Action
Executes the code in the cfcatch tag.
If the
an appropriate cferror handler or site-wide error handler.
Executes the code in the
using the
page 247.
Uses the error page specified by the
Uses the custom error page specified by the Administrator setting.
Uses the error page specified by the
Uses the standard error message format
tag specifies a page to handle this error type, ColdFusion uses the specified error page.
Last updated 8/5/2010
or
tag, or on a custom tag page that
cfmessagebox
Runtime exception
"Error messages and the standard error
block does not have a
cftry
cfcatch
onError
method. For more information on
onError
method, see
"Handling errors in
cferror
cferror
block, and Application.cfc does not have an
cftry
280
errors."
format" on
tag for this error, tests for
Application.cfc" on
tag.
tag.
"Logging errors

Advertisement

Table of Contents
loading

Table of Contents