Not sure I can really answer your entire question, but rethrow is used
when you want to handle "some", but not "all" exceptions.  For example,
you could check for database connectivity errors and handle them inside
a particular page.  However, you don't handle the missing includes, so
you use cfrethrow to pass it up a level where you, hopefully, catch it
there.

M!ke 

-----Original Message-----
From: Ken Dunnington [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 20, 2005 10:24 AM
To: CF-Talk
Subject: cfrethrow question

I'm trying to update some error reporting on a site I did awhile ago.
It's a fairly messy site, and I eventually plan on refactoring the whole
thing, but for now I just want to get more concise error reporting.
Right now, I have one particular block that is puzzling me.
I have a cftry/cfcatch block with a call to an external payment gateway
(via cfhttp) that has a bad habit of timing out. In the cfcatch block I
have it email me with a dump of #cfcatch#. Now, we ALSO added an error
page in Application.cfm that will email me with #error# and a few other
variables. I am not getting the #cfcatch# email, and when the
transaction times out, the email I get says that it was cfmail who timed
out (but how did I get the email if cfmail timed out?!)

Should I just get rid of the try/catch block? Should I use cfthrow or
cfrethrow in the catch block to send the error up to the main error
page? I've never really "gotten" cfrethrow, and I'm fairly sure I'm on
the wrong track here, so any insight would be appreciated. :)

- Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203669
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to