I'm trying to create an error handling scheme for our website, and I've defined
two custom error types (DN_NOCLIENT and DN_EXPIRED), which I intend to
<cfthrow> when necessary, and handle with <cferror>. Unfortunately, it seems
that the actual custom error that I throw doesn't matter. :shocked;
Error handling code in my Applicaiton.cfm file:
<cferror type="VALIDATION" template="/ErrorHandlers/Validation.cfm">
<cferror type="REQUEST" template="/ErrorHandlers/Request.cfm">
<cferror type="EXCEPTION" exception="DN_EXPIRED"
template="/ErrorHandlers/Expired.cfm">
<cferror type="EXCEPTION" exception="DN_NOCLIENT"
template="/ErrorHandlers/NoClient.cfm">
<cferror type="EXCEPTION" exception="any"
template="/ErrorHandlers/Exception.cfm">
Example of how I'm throwing the error:
<cfthrow type="DN_EXPIRED">
When I throw the error, i get the DN_NOCLIENT template. Playing with the
order of the cferrors reveals that whichever custom exception type is last is
the error page I get.
What am I doing wrong?
CF 6.0 updater 3, Windows install.
Thanks to anyone who can shed some light on this...
Dave
Pekka - 31 Jan 2007 22:07 GMT
Good question...
What do you mean by last? The last in your list in Application.cfm, or the
last exception that's being thrown?
I _think_ they changed something about ordering in a similar setup using
try/catch before 7.0. Could be a similar problem.