Re: best practices in error handling in PHP

From: 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 handling
No point IMO when you could use either the below two.
* Using PEAR error object
I wouldn't advise it.
* Using try and catch exceptions
In 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

« previous php.general (#271363) next »