> Why can't the error handler page contain any CFML, just
> because? Thanks!
Well, depending on how you use CFERROR and error handling, you may be able
to use CFML within your error pages. Originally, you could only use CFERROR
to trap errors, using TYPE="REQUEST". The error page you'd go to wouldn't
allow you to have any CFML code because if that code had an error itself, it
would trigger the CFERROR tag, which would load the error page...
In later versions, though, you've got lots of options for handling error
conditions:
1. Site-wide error handler
In CF 4.5, you can specify a site-wide error handler, which will redirect
any error not otherwise handled to a single error page. You can use CFML in
this page; if there's a CFML error within your error page, the CF Server
will just ignore your error page and show the original default error
message. Also, if you use this, it will override any CFERROR TYPE="REQUEST"
tags in your applications.
2. Exception handling
CF 4.0 introduced CFTRY, CFCATCH and CFTHROW, which allow you to do all
sorts of things when something bad happens, instead of creating an error and
ceasing page execution. CF 4.5 added CFRETHROW to the list.
3. New CFERROR types
CF 4.5 added two new TYPE attribute values: Exception and Monitor. You can
use TYPE="EXCEPTION" to direct errors of specific types, such as database
errors, to specific pages. Those pages can contain any CFML code you want.
TYPE="MONITOR" is for debugging purposes.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.