Pardon the long note, folks, but Scott's problem has several implications. Let me try to address a few.
Scott, yes, the site-wide error handler works just like CFERROR type="exception", at least as regards what you can do in the template--which is anything. You control what the user sees, and you control what other processing you do from that page (like CFMAIL, CFQUERY to insert error data into a database, CFLOG, etc.) I should note that some readers may be confused, thinking that you can't do CFML in an error handler. That's the way it was prior to CF 4, when all we had was CFERROR type="request". I realize that's not your concern, Scott. Just clarifying for others. As for your problem, it sounds like you're saying that it seems that some errors are just not being caught by the site-wide error handler. That's unusual, but not unheard of. First, and perhaps most important, the problem could simply be that you have an error in the error handler. :-) Sadly, in that case, the error handler is ignored and the "normal" error screen dump is what the user sees, and you get no notification. Second, be careful about confirming that the error handler you *think* should be working is indeed the one that is. For instance, change it to do nothing but say "I'm here", then run a page with an error (such as a one line template doing <cfset x=y>, which if y is undefined will get an error.) Do you get the error handler? If not, then maybe some OTHER error handler is the real culprit. The CFMX Admin console help indicates that the site-wide handler is relative to the web root. Third, the admin help also says, "If the user is running Internet Explorer with "Show Friendly HTTP error messages" enabled in advanced settings (the default), Internet Explorer displays this page only if it contains more than 512 bytes." Perhaps that could be tripping you up. Fourth, I've seen instances where the site-wide error, and even CFERROR, don't catch a given error. It's rare, but happens. Again, if you first confirm that the "really simple" error handler works, then test your "real" code to see if it catches that. If it does not, you may have some other problem. Finally, if anyone wants to learn more about error handling (site-wide, cferror, and cftry/cfcatch), I wrote a series of articles quite some time ago, but they're still relevant: Toward Better Error Handling - Part 1 (Admin Settings) http://www.sys-con.com/story/?storyid=41977&DE=1 Toward Better Error Handling - Part 2 (Error Handling Templates) http://www.sys-con.com/story/?storyid=41844&DE=1 Toward Better Error Handling - Part 3 (Application-Level Error Handling) http://www.sys-con.com/story/?storyid=41870&DE=1&DE=1 Toward Better Error Handling - Part 4 (Page-Level Error Handling) http://www.sys-con.com/story/?storyid=41772&DE=1 Hope some of that's helpful. Charlie Arehart CTO, New Atlanta Communications, makers of BlueDragon (678) 256-5395 [EMAIL PROTECTED] www.newatlanta.com/bluedragon/ > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of Scott Thornton > Sent: Tuesday, March 14, 2006 12:31 AM > To: [email protected] > Subject: [cfaussie] Site-wide Error Handler > > > Hi, > > I am investigating the use of the Site-wide Error Handler > template that can be defined in CFMX admin in 6.1 > > I would be interested in hearing from people who have it in > use..... with repesct to what information is presented to the > user, and what information (if any) can be sent to the > administrator\developer via cfmail or other methods. > > As the project go-live is fairly recent, we are still finding > bugs that cause ODBC errors, currently these errors cause the > typical coldfusion error which shows sql etc, that we use to > fix errors, also we occasionally get the "native thread" > error, for which I would like to present 'nicer' error messages for. > > I appreaciate any thoughts\experiences offered.... > > Thanks heaps. > > > > > > Scott Thornton, Programmer > Application Development > Information Services and Telecommunications Hunter-New > England Area Health Service > p: +61 2 49813589 > m: 0413800242 > e: scott.thornton <at> hnehealth.nsw.gov.au > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cfaussie" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cfaussie -~----------~----~----~----~------~----~------~--~---
