From: Operating system: PHP version: 5.3.5 Package: SPL related Bug Type: Feature/Change Request Bug description:ability to to handle Class not found error
Description: ------------ currently you can throw an exception from the autoloader, hence if you can't find a class, your application can gracefully exists, instead of exiting via the class not found fatal error. my problem is, that I would like to use multiple autoloader (for example in a project which uses multiple component, or framework), but in this case, I can't throw an Exception from my autoloader, because maybe the other autoloaders could load the class. if I'm sure that I will register the last autoloader, the this isn't a problem(my last autoloader will throw the Exception on missing class), but maybe I have to load a component late of the exection. it would be cool, if I could somehow register a callback which will be called, when the spl autoload callbacks was executed, but the class couldn't be loaded of course, from this callback, I cannot continue the normal execution flow, however I can log the error, and let the callback return and get the class not found fatal error, or throw an Exception, and handle/log the error from a higher level. -- Edit bug report at http://bugs.php.net/bug.php?id=54032&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54032&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54032&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54032&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54032&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54032&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54032&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54032&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54032&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54032&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54032&r=support Expected behavior: http://bugs.php.net/fix.php?id=54032&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54032&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54032&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54032&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54032&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54032&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54032&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54032&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54032&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54032&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54032&r=mysqlcfg