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.Exceptionhandles exceptions,Monitorsets up an exception monitor, andValidationhandles form validation errors that occur when a form is submitted (useful only in anApplication.cfmtemplate).-
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
TYPEisMonitor, ColdFusion invokes the specified error handling template before processing anyCFTRY/CFCATCHerror handling that may be in the executing template.When
TYPEisRequest, 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 whenTYPEisExceptionorMonitor.When
TYPEisValidation, 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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access