cferror

Displays a custom HTML page when an error occurs. This lets
you maintain a consistent look and feel among an application's
functional and error pages

  <cferror type="exception" template="">

 cferror(type="exception", template="");

Attribute Reference

type string
Required

Type of error that the custom error page handles. The type
also determines how CFML handles the error page. For
more information, see Specifying a custom error page in
Developing CFML MX Applications.

exception: a exception of the type specified by the
exception attribute.
validation: errors recognized by sever-side type
validation.
request: any encountered error.
monitor: deprecated.
Values:
  • exception
  • validation
  • request
  • monitor

template string
Required

Relative path to the custom error page.
(A CFML page was formerly called a template.)

mailto string

An E-mail address. This attribute is available on the
error page as the variable error.mailto. CFML does
not automatically send anything to this address.

exception string
Default: any

Type of exception that the tag handles:

application: application exceptions
database: database exceptions
template: CFML page exceptions
security: security exceptions
object: object exceptions
missingInclude: missing include file exceptions
expression: expression exceptions
lock: lock exceptions
custom_type: developer-defined exceptions, defined in the
cfthrow tag
any: all exception types
Values:
  • any
  • application
  • database
  • template
  • security
  • object
  • missinginclude
  • expression
  • lock
  • custom_type

Examples
Sample code using the cferror tag

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub