Specifying custom error messages with the cferror tag
Custom error pages let you control the error
information that users see. You can specify custom error pages for
different types of errors and handle different types of errors in
different ways. For example, you can create specific pages to handle errors
that could be recoverable, such as request time-outs. You can also
make your error messages consistent with the look and feel of your
application.
You can specify the following types of custom error message pages:
Type
|
Description
|
Validation
|
Handles server-side form field data validation
errors. The validation error page cannot include CFML tags, but
it can display error page variables.
You can use this attribute
only in the Application.cfc initialization code or on the Application.cfm
page. It has no effect when used on any other page. Therefore, you
can specify only one validation error page per application, and
that page applies to all server-side validation errors.
|
Exception
|
Handles specific exception errors. You can
specify individual error pages for different types of exceptions.
|
Request
|
Handles any exception that is not otherwise-handled.
The request error page runs after the CFML language processor finishes.
As a result, the request error page cannot include CFML tags, but
can display error page variables. A request error page is useful
as a backup if errors occur in other error handlers.
|