Dave & Chris, I think all DB errors are logged into the application.log file. If you notice from the log, all uncaught DB exceptions generate 2 entries in the log. One which is strictly an ODBC error with no CFML error info (e.g. tag context, line number, et al). The second one is the actual error message that the user would see. Both entries share the same TID (thread id) and almost identical error message with the second one being more descriptive and within the context of a CFML template. A caught DB exception would only generate the first log entry (the ODBC error), but will not generate the second. The user does not actually see the CF DB error if the exception is caught and handled properly.
Hope this helps. (Of course, I can be very far off base here....) -------------------- James Ang Senior Programmer MedSeek http://www.MedSeek.com/ -----Original Message----- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 3:08 PM To: CF-Talk Subject: RE: cfcatch and can't catch > Thanks for the response. Interesting observation - I AM > using a rethrow in a cfcatch, though I don't think that's > what's causing the problem. > > I use a rethrow because timeout errors come in two types > here: type=unknown and > type=com.allaire.coldfusion.request.timeout. I have 4 > cfcatch's: type=expression, type=database, type=any, type=any. > > Inside the first type=any I check if type=...timeout or if > the first 17 characters of cfcatch.message are "Request timed > out". If so, I rethrow, and the second type=any is actually > the cfcatch for timeouts. > > Since the caught type is database, I don't think this > error-handling is getting to the type=any cfcatch statements. > > We're not using cferror type=monitor, only type=exception. > Though perhaps I should be using type=request to catch more > things if they slip past the cfcatch's. OK. If you're doing something like this, though, I can see a potential problem: <cftry> <cfquery ...> </cfquery> <cfcatch type="database"> ... </cfcatch> <cfcatch type="any"> <cfif something> <cfrethrow> </cfif> </cfcatch> <cfcatch type="any"> ... </cfcatch> </cftry> The second CFCATCH won't throw an exception to the third CFCATCH, but instead it'll throw it to a higher-level CFCATCH (if one exists, you'd have this entire CFTRY block wrapped within a CFCATCH in a larger CFTRY!) or to a calling page, if this is a custom tag. However, that doesn't seem to address your specific problem, which is with the first CFCATCH. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ______________________________________________________________________ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists