News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevShed:
Displaying Meaningful Error Messages when Auto Loading Classes in PHP 5
December 26, 2007 @ 11:56:00

DevShed has posted the next part of their series looking at handling errors thrown by the __autoload functionality of PHP. This time they enhance their previous method and allow for custom error messaging.

In this last article of the series I'm going to introduce some additional modifications to the current signature of the "__autoload()" function to make it throw exceptions that display more useful error messages.

They start by setting up the application to have something to build from (a series of PHP scripts). They add on the exception handling to throw the custom error (the "class not found" they mentioned).

0 comments voice your opinion now!
error message throw exception autoload class error message throw exception autoload class


blog comments powered by Disqus

Similar Posts

DevShed: Decoupling the Validation of Data with Bridge Classes in PHP 5

Community Crosstalk: Matthew O'Phinney & Scott Johnson on Dynamic Function/Method Calls

PHPBuilder.com: Dynamic XML with PHP

Pierre-Alain Joye's Blog: Howto use a single php.ini for cli/cgi with htscanner, use 0.7.0 or later

DevShed: Displaying Meaningful Error Messages when Auto Loading Classes in PHP 5


Community Events





Don't see your event here?
Let us know!


bugfix symfony developer api framework list zendserver language library tips deployment interview release introduction community series conference laravel podcast voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework