CFERROR  
 
 

Provides the ability to display customized HTML pages when errors occur. This allows you to maintain a consistent look and feel within your application even when errors occur.

 
 
  Syntax  
 
<CFERROR TYPE="err_type"
    TEMPLATE="path"
    MAILTO="email_address">

TYPE

The type of error that this custom error page is designed to handle:

  • Specify Request to handle errors that occur during the processing of a page. Request is the default.
  • Specify Validation to handle data input validation errors that occur when submitting a form. A validation error handler is only useful if placed inside the Application.cfm file.

TEMPLATE

The relative path to the file containing the error page. Note that this page can only include the error variables described below and cannot include CFML tags.

MAILTO

The email address of the administrator who should be notified of the error. This value is available to your custom error page using the MailTo property of the error object, such as #Error.MailTo#.

 
 
  Usage  
 

The CFERROR tag is normally used to customize the error messages for all the pages in an application. As a result, you generally embed it in the Application.cfm file. For more information about the Application.cfm file, refer to Developing Web Applications with ColdFusion.

To help ensure that error pages display successfully, pages you specify with CFERROR should not be encrypted with the cfcrypt utility.



 
 
BackUp LevelNext
 
 

allaire     AllaireDoc@allaire.com
    Copyright © 1998, Allaire Corporation. All rights reserved.