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
