On 12/29/05, Dave Watts <[EMAIL PROTECTED]> wrote: > However, > wrapping a CFTRY around a page is bad, bad, bad! That's not what it's for - > that's why we have CFERROR.
As obsessed as I am about error handling, it unfortunately took me a long time to learn this, and I am still pulling try/catch statements out of old code I come across. I did it for years. With that in mind... > Wrapping a CFTRY around a page prevents you from > using CFTRY usefully within that page. Actually you can nest try/catch (wrap whole page, with individual code blocks wrapped inside of that) and its not a problem, although as you say its a dumb thing to do, once you know better. > When you wrap the entire page in CFTRY, your > problem could be on line 2 or line 200. Yes indeed, but cfcatch-scope variables will tell you precisely where the error occurred, and why, just like you'd get with an error-scope message. Pretty sure you even get a stack trace so you can drill down to the include or module that *really* caused the problem. -- --mattRobertson-- Janitor, MSB Web Systems mysecretbase.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227957 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

