Re: best practices in error handling in PHP

From: Date: Wed, 12 Mar 2008 14:31:07 +0000
Subject: Re: best practices in error handling in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-271364@lists.php.net to get a copy of this message
> 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 > * Using PEAR error object > * Using try and catch exceptions > 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. It seems to me that 1 and 3 aren't necessarily mutually exclusive. I believe that you can use your own error classes in php's try/catch functionality. As for PEAR's error object, unless you are using PEAR elsewhere in your app I'm not sure it would be worthwhile to just use this very small piece. This is all just IMO. thnx, Chris

« previous php.general (#271364) next »