>This is usually accomplished by specifying an error template via the
>CFERROR tag in your application.  Because the template specific has a
>narrow range of CF it can execute, most people then use _javascript_ to
>have the error template post a hidden form to a full-fledged CF
>template that emails the error to the admin and displays a friendly
>message to the user.

Nearly every error you will encounter can be handled by a global exception error handler. An exception error handler can run any CF code. A request error handler is used as backup if something really bad happens, such as an error inside of the exception error handler. The request error handler is what needs the _javascript_ to post a hidden form to a CF page to send E-mail. But in practice 99% of your errors will be handled by the exception error handler, which can use the cfmail tag.

Below are the two lines I add to application.cfm:
<cferror type="EXCEPTION" template="exception.cfm" exception="ANY">
<cferror type="REQUEST" template="request.cfm" mailto="#request.adminEmail#">

ColdFusion also has a global 404 error handler that you set up in CFAdmin.

Good luck,
Mike Chabot
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to