Chris, You are on the right track here. CFRETHROW within a CFCATCH throws to a upper level CFTRY block, and not within the same level as the current CFTRY/CFCATCH block. E.g.:
<cftry><!--- Level 0 ---> <cftry><!--- Level 1 ---> <cf_somereallylongwindedcodehere> <cfcatch type="any"><!--- Level 1 ---> <cfif NOT myerror> <cfrethrow> </cfif> </cfcatch> </cftry> <cfcatch type="any"><!--- Level 0 ---> <!--- Your timeout handler code here ---> </cfcatch> </cftry> If think, from your description, you had this: <cftry><!--- Level 0 ---> <cf_somereallylongwindedcodehere> <cfcatch type="any"><!--- Level 0 ---> <cfif NOT myerror> <cfrethrow><!--- causes CF error page to be displayed ---> </cfif> </cfcatch> <cfcatch type="any"><!--- Level 0 ---> <!--- Your timeout handler code here: Never gets executed. ---> </cfcatch> </cftry> This of course, won't work like what you wanted. ;) Lesson to Learn: There can be only ONE <CFCATCH type="Any"> for a CFTRY. -------------------- James Ang Senior Programmer MedSeek http://www.MedSeek.com/ -----Original Message----- From: Chris Norloff [mailto:[EMAIL PROTECTED]] Sent: Monday, January 07, 2002 1:28 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. thanks for the ideas, Chris Norloff ---------- Original Message ---------------------------------- From: Dave Watts <[EMAIL PROTECTED]> Date: Mon, 7 Jan 2002 15:07:12 -0500 >> Here's an odd one - I've got two instances where an error >> was, at the same time, caught and handled by cfcatch, and >> NOT-CAUGHT and hit the CFserver. >> >> I'll put the shorter of the two examples below - one is the >> application.log file entry, and the other is our logging of >> all error.vars available. Note that in each case the >> date/time, error code, and specific data used in the query >> are the same. > >The only reason I can think of for why this would happen is if you're >rethrowing the error within your CFCATCH (which I'm guessing you're not) or >if you're using CFERROR TYPE="MONITOR" to catch exceptions, in which case I >think you're getting the appropriate behavior. > >On the other hand, it could simply be a bug in the Solaris version. > >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