This coding tip demonstrates how to deal with PHP core notices and warning (aka recoverable errors) in the exception way, using try/catch statement.

The way on how PHP informs you about the errors, warnings, and notices in the script is one of the PHP messy areas. The half-way OOP changes, made in PHP 5, did not change the way on how PHP handle some runtime issues, like accessing an undefined variable or writing into read-only files. In the same time, new Exception-based error handling, which was added into the engine, provides the developers with the standard and time-proven way of dealing with exceptions in the code.

more: http://www.alexatnet.com/node/23

0 comments