Yes you are right i can use trigger_error that will use the function that handles errors from my class. Thanks ----- Original Message ---- From: Christoph Boget <christoph.boget@xxxxxxxxx> To: It Maq <itmaqurfe@xxxxxxxxx> Cc: php-general@xxxxxxxxxxxxx Sent: Wednesday, March 12, 2008 10:31:07 AM Subject: Re: best practices in error handling in PHP > 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 ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping