Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / January 2007



Tip: Looking for answers? Try searching our database.

cferror and multiple custom error types

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DGH - 16 Jan 2007 14:03 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.