Understanding errors
289
Basic exception types
All ColdFusion exceptions except for custom exceptions belong to a basic type category. These
types consist of a broadly-defined categorization of ColdFusion exceptions. The following table
describes the basic exception types:
Note:
The Any type includes all error with the Java object type of java.lang.Exception. It does not
include java.lang.Throwable errors. To catch Throwable errors, specify java.lang.Throwable in the
cfcatch
tag
type
attribute.
Custom exceptions
You can generate an exception with your own type by specifying a custom exception type name,
for example MyCustomErrorType, in a
cfthrow
tag. You then specify the custom type name in a
cfcatch
or
cferror
tag to handle the exception. Custom type names must be different from any
built-in type names, including basic types and Java exception classes.
Type
Type name
Description
Database failures
Database
Failed database operations, such as failed SQL
statements, ODBC problems, and so on.
Missing include file
errors
MissingInclude
Errors where files specified by the
cfinclude
,
cfmodule
, and
cferror
tags are missing. (A
cferror
tag generates a missingInclude error only when an
error of the type specified in the tag occurs.)
The
MissingInclude
error type is a subcategory of
Template error. If you do not specifically handle the
MissingInclude error type, but do handle the Template
error type, the Template error handler catches these
errors.
MissingInclude
errors are caught at runtime.
Template errors
Template
General application page errors, including invalid tag
and attribute names. Most
Template
errors are caught
at compile time, not runtime.
Object exceptions
Object
Exceptions in ColdFusion code that works with
objects.
Security exceptions
Security
Catchable exceptions in ColdFusion code that works
with security.
Expression exceptions Expression
Failed expression evaluations; for example, if you try to
add 1 and "a".
Locking exceptions
Lock
Failed locking operations, such as when a
cflock
critical section times out or fails at runtime.
Verity Search engine
exception
SearchEngine Exceptions
generated by the Verity search engine
when processing
cfindex
,
cfcollection
, or
cfsearch
tags.
Application-defined
exception events raised
by
cfthrow
Application
Custom exceptions generated by a
cfthrow
tag that
do not specify a type, or specify the type as
Application
.
All exceptions
Any
Any exceptions. Includes all types in this table and any
exceptions that are not specifically handled in another
error handler, including unexpected internal and
external errors.
Summary of Contents for COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Page 1: ...Developing ColdFusion MX Applications...
Page 22: ...22 Contents...
Page 38: ......
Page 52: ...52 Chapter 2 Elements of CFML...
Page 162: ......
Page 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Page 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Page 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Page 266: ......
Page 314: ...314 Chapter 14 Handling Errors...
Page 344: ...344 Chapter 15 Using Persistent Data and Locking...
Page 349: ...About user security 349...
Page 357: ...Security scenarios 357...
Page 370: ...370 Chapter 16 Securing Applications...
Page 388: ...388 Chapter 17 Developing Globalized Applications...
Page 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Page 410: ......
Page 426: ...426 Chapter 19 Introduction to Databases and SQL...
Page 476: ...476 Chapter 22 Using Query of Queries...
Page 534: ...534 Chapter 24 Building a Search Interface...
Page 556: ...556 Chapter 25 Using Verity Search Expressions...
Page 558: ......
Page 582: ...582 Chapter 26 Retrieving and Formatting Data...
Page 668: ......
Page 734: ...734 Chapter 32 Using Web Services...
Page 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Page 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Page 788: ......