tag:blogger.com,1999:blog-6561158321848231022.post8243006178508409763..comments2023-05-04T09:16:26.127-05:00Comments on KraFusion: Try/Catch in OnError function of Application.cfcJoey Krabacherhttp://www.blogger.com/profile/08443914099315384886noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6561158321848231022.post-70906443247190381912009-03-26T04:05:00.000-05:002009-03-26T04:05:00.000-05:00quote: "Sorry to bust your bubble, but what if you...quote: "Sorry to bust your bubble, but what if your OnError function throws an error(referencing a variable that isn't present for example)? Then what? That's right, a hard ColdFusion error will be shown and hopefully you were smart and turned off the Robust Exception option in the ColdFusion Administrator! :)"<BR/><BR/>- actually, this is why you always want a Server-wide Error-handler defined in your CF Admin. No type of CF error can get past it, assuming there are no errors in the error-handler template itself. You want to put a try/catch around any block of code in your error-handling that could ever possibly break (tip: certain CF scopes, such as FORM, URL, session, and others aren't even defined in Event Gateways for example, so your error-handling can never assume it can just cfdump them in an email and send them to you)Aaron Longnionhttps://www.blogger.com/profile/03864976259628767766noreply@blogger.com