Re: best practices in error handling in PHP
| From: | Richard Heyes | Date: | Wed, 12 Mar 2008 14:30:40 +0000 |
| Subject: | Re: best practices in error handling in PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271363@lists.php.net to get a copy of this message | ||
It Maq wrote:
I want to know what is the best solution for handling errors. After reading some documents dealing with the subject, i have three options: * Using a class for error handlingNo point IMO when you could use either the below two.
* Using PEAR error objectI wouldn't advise it.
* Using try and catch exceptionsIn a new app, or (particularly) if you're adapting existing code, this is the one I'd recommend.
The error handling i want to implement will be done in a big application that was developed from the beginning without any concern about error handling.Aren't they all? :-/ -- Richard Heyes Employ me: http://www.phpguru.org/cv