Re: best practices in error handling in PHP

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

 



2008. 03. 12, szerda keltezéssel 07.18-kor It Maq ezt írta:
> Hi,
> 
> 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

I would go for try/catch, define different exception classes if
different actions need to be taken, catch them based on their class to
take appropriate action, and catch anything else in the top layer.

greets,
Zoltán Németh

> 
> 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.
> 
> Thank you
> 
> 
> 
> 
>       ____________________________________________________________________________________
> Looking for last minute shopping deals?  
> Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


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