| Contents > Developing ColdFusion MX Applications > Handling Errors > Specifying custom error messages with cferror > Specifying a custom error page |
|
|
|
|
||
You specify the custom error pages with the cferror tag. For Validation errors, the tag must be on the Application.cfm page. For Exception and Request errors, you can set the custom error pages on each application page. However, because custom error pages generally apply to an entire application, it is more efficient to put these cferror tags in the Application.cfm file also. For more information on using the Application.cfm page, see Designing and Optimizing a ColdFusion Application.
The cferror tag has the attributes listed in the following table:
Attribute |
Description |
|---|---|
Type |
The type of error that will cause ColdFusion to display this page: Exception, Request, or Validation. |
Exception |
Use only for the Exception type. The specific exception or exception category that will cause the page to be displayed. This attribute can specify any of the types described in About ColdFusion exceptions. |
Template |
The ColdFusion page to display. |
MailTo |
(Optional) An e-mail address. The |
The following cferror tag specifies a custom error page for exceptions that occur in locking code and informs the error page of the of an e-mail address it can use to send a notification each time this type of error occurs:
<cferror type = "exception"
exception = "lock"
template = "../common/lockexcept.cfm"
mailto = "server@mycompany.com">
For detailed information on the cferror tag, see CFML Reference.
|
|
||
| Contents > Developing ColdFusion MX Applications > Handling Errors > Specifying custom error messages with cferror > Specifying a custom error page |
|
|
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/errors21.htm