Re: Exceptions: How much is too much.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2007-01-05 at 00:44 -0500, Craige Leeder wrote:
> The question is: How much is too much. Should I use Exceptions to
> handle all of my error reporting/triggering? How about catching them?
> I mean, if I'm using Exceptions for all of my error handling, I could
> easily end up wrapping my entire script in a try block(or at least
> having almost all my end-code within a number of them).

Not sure if I am doing it correctly either, but, what I do is use
try/catch blocks to instantiate all of the objects that I need and then
let the script take over. I also use exceptions to handle SQL errors in
my db abstraction object(s). That way, only real messes are caught and
the script then displays a graceful exit page to the user instead of
screen vomit that may scare them off.

--Paul

All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux