User Guide
96 Developing Web Applications with ColdFusion
Types of recoverable exceptions
Type Tag(s) Notes
Application-defined
exception events
CFTHROW
CFCATCH TYPE="Application"
CFCATCH TYPE="Any"
a CFCATCH block that has no TYPE
attribute
Raise exceptions using the
CFTHROW tag (with an optional
diagnostic message), then catch
using CFCATCH.
If you specify the type to be
"APPLICATION," the CFCATCH tag
catches only those custom
exceptions that have been specified
as having the APPLICATION type in
the CFTHROW tag that defines
them.
Database failures
CFCATCH TYPE="Database"
CFCATCH TYPE="Any"
Catch failed database operations,
such as failed SQL statements, ODBC
problems, and so on.
Template errors
CFCATCH TYPE="Template"
CFCATCH TYPE="Any"
Catch general application page
errors.
The tags that throw an exception of
TYPE="TEMPLATE" are CFINCLUDE,
CFMODULE, and CFERROR.
Missing included file
errors
CFCATCH TYPE="MissingInclude"
CFCATCH TYPE="Any"
Catch errors for missing included
files.
Object exceptions
CFCATCH TYPE="Object"
Catch exceptions in ColdFusion
code that works with objects.
Security exceptions
CFCATCH TYPE="Security"
Raise catchable exceptions in
ColdFusion code that works with
security.
Expression exceptions
CFCATCH TYPE="Expression"
Catch exceptions when an
expression fails evaluation.
Locking exceptions
CFCATCH tag with TYPE="Lock"
Catch failed locking operations,
such as when a CFLOCK critical
section times out or fails at runtime.
Custom exceptions
CFCATCH
TYPE="
your_custom_exception_type
"
Specify a custom type as well as one
of the predefined types.
Unexpected internal
exceptions
CFCATCH TYPE="Any"
Catch unexpected exceptions