|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-10 19:28 UTC] helly@php.net
[2004-12-28 10:49 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
Description: ------------ When You try to implement some sort of class-loader, the autoload-function is very usefull. But as soon as you want the user-code to do something special when a class isn't found, it'd be handy to throw out an exception, which the user-code either can catch or ignore. With the current beta2 that isn't possible as it seems. Reproduce code: --------------- <? function __autoload($class) { throw new Exception($class . " does not exist."); } try { $obj = new test(); // Where test is a non-existent class } catch(Exception $e) { echo $e; } ?> Expected result: ---------------- Something like: exception 'exception' with message 'test does not exist.' etc.. Actual result: -------------- Fatal error: __autoload threw an exception in /home/acm/public_html/kb/autoload.php on line 11