Re: best practices in error handling in PHP

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

 



>  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

-- 
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