Name
CFERROR
Synopsis
<CFERROR>
Displays a custom error page when an error occurs in a ColdFusion
application. The CFERROR
tag is most often
included within an application’s
Application.cfm
template.
Attributes
-
TYPE="
error_type
"
Specifies the error type to watch for. Required. The default is
Request
, which handles all errors that occur during a page request.Exception
handles exceptions,Monitor
sets up an exception monitor, andValidation
handles form validation errors that occur when a form is submitted (useful only in anApplication.cfm
template).-
TEMPLATE="
path
"
The relative path to the custom error template. Required.
When TYPE is
Exception
, any ColdFusion tags can be used in the exception handling template. Exception handling templates may also be invoked by specifying a Site-wide Error Handler within the Server Settings section of the ColdFusion Administrator.When
TYPE
isMonitor
, ColdFusion invokes the specified error handling template before processing anyCFTRY
/CFCATCH
error handling that may be in the executing template.When
TYPE
isRequest
, a number of variables are available in the error-handling template (listed in “Return Variables”), but no other CFML tags can be used. These variables are also available whenTYPE
isException
orMonitor
.When
TYPE
isValidation
, a number of variables are available to the validation error-handling template (listed next in “Return Variables”), but no other CFML tags may be used in the template.-
EXCEPTION="
exception_type
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.