User Guide

Table Of Contents
Understanding errors 313
For more information on using hidden form field validation, see Chapter 28, “Validating Data,
on page 659. For more information on Application.cfc, see Chapter 13, “Designing and
Optimizing a ColdFusion Application,” on page 275
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 cfinclude or cfmodule tag, or on a custom
tag page that you access using the cf_ notation, ColdFusion handles it as a runtime exception
in the page that accesses the tag. See the “Runtime exception errors section, next, for a
description of how these errors are handled.
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 “Error messages and the standard error format” on page 314.
Runtime exception errors
If ColdFusion encounters a runtime exception, it does the action for the first matching condition
in the following table:
For example, if an exception occurs in CFML code that is not in a
cftry block, and
Application.cfc does not have an
onError method, but a cferror tag specifies a page to handle
this error type, ColdFusion uses the specified error page.
Condition Action
The code with the error is inside a
cftry tag
and the exception type is specified in a
cfcatch tag.
Executes the code in the
cfcatch tag.
If the
cftry block does not have a cfcatch tag for this
error, tests for an appropriate
cferror handler or site-
wide error handler.
The ColdFusion MX application has an
Application.cfc with an
onError method
Executes the code in the
onError method. For more
information on using the
onError method, see
“Handling errors in Application.cfc” on page 290
A
cferror tag specifies an exception error
handler for the exception type.
Uses the error page specified by the cferror tag.
The Administrator Settings Site-wide Error
Handler field specifies an error handler page.
Uses the custom error page specified by the
Administrator setting.
A
cferror tag specifies a Request error
handler.
Uses the error page specified by the cferror tag.
The default case. Uses the standard error message format