> Forgive me for being dense, but why is it an awful idea? > System resources? Granularity on code? Just sloppy or lazy? > > Currently I have certain pages wrapped in a cftry and in the > cfcatch I send myself an email as well as give the user a > polite apology for any inconvenience.
It's the wrong tool for the job, and will keep you from using it where it's appropriate. It's arguably sloppy, but not lazy, since the better solution is generally easier to implement. The point of an exception handler is to let you respond to specific problems with specific solutions. If you don't have both a specific problem and a specific solution to that problem, you're better off letting a generalized error handler deal with the problem. CF provides two useful, powerful mechanisms for generalized error handling - the site-wide error handler and the CFERROR tag (or onError function if you're using Application.cfc in CFMX 7). By placing an exception handler around each page, you are adding unnecessary code to each page, and you have to ensure that this code works the same way on all your pages. That's the opposite of lazy. Plus, when you actually do have a specific problem within a single, identifiable algorithm or process, and a specific solution to that problem, you won't be able to use exception handling to solve that problem, since you've already wrapped the entire page in what is essentially a generalized error handler. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create Web Applications With ColdFusion MX7 & Flex 2. Build powerful, scalable RIAs. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270359 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4