try
: The try block allows you to demarcate the code to test if it fails or passes (https://cfdocs.org/cftry)finally
: The finally block executes no matter if the try fails or passes. It is guaranteed to always execute. (https://cfdocs.org/cffinally)any
or a custom exception type declared by the CFML engine, Java code or custom exceptions within your code. This is a great way to be able to intercept for specific exception types and address them differently.application
: catches application exceptionsdatabase
: catches database exceptionstemplate
: catches ColdFusion page exceptionssecurity
: catches security exceptionsobject
: catches object exceptionsmissingInclude
: catches missing include file exceptionsexpression
: catches expression exceptionslock
: catches lock exceptionsjava.lang.Exception
: catches Java object exceptionssearchengine
: catches Verity search engine exceptionsany
: catches all exception typesInvalidInteger
" then you can listen to it like this:throw
or cfthrow
constructs used to throw a developer-specific exception. (https://cfdocs.org/cfthrow)throw()
function or tag has several attributes:rethrow
or cfrethrow
construct allows you to well, rethrow
the active exception by preserving all of the exception information and types. Usually you use rethrow
within a catch block after you have done some type of operations on the incoming exception. (https://cfdocs.org/cfrethrow)