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="Request|Exception|Validation"
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, andValidation
handles form validation errors that occur when a form is submitted (useful only in an Application.cfm template). In previous versions of ColdFusion,cferror
supported another type,Monitor
, which could be used to set up an exception monitor.-
template="
path
"
The relative path to the custom error template. Required.
When
type
isException
, 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
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
.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
"
The type of exception to watch for. Required when
type
isException
. Possible ...
Get Programming ColdFusion MX, 2nd Edition 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.