Re: Re: SPLClassLoader RFC Thoughts And Improvements
| From: | Christian Kaps | Date: | Fri, 11 Nov 2011 12:21:33 +0000 |
| Subject: | Re: Re: SPLClassLoader RFC Thoughts And Improvements | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-56277@lists.php.net to get a copy of this message | ||
Am 11.11.2011 12:53, schrieb Anthony Ferrara:
If no one of the core devs has objections against it, I can write a RFC for this feature!?Would it not be possible that the autoloader mechanism catch all exceptions made by any autoloader which fails to load a class. Only if none of the register autoloaders can load the requested class the autoloader mechanism throws an AutoloadException with all the catched exceptions. This behaviour should be controllable by the users environment. So if using an autoloader(e.g. from a library) which throws an exception, but the user doesn't use exceptions in his environment, he should be able to deactivate the exceptions thrown by the autoloader mechanism. I think this behaviour has the greatest advantages for both worlds. This one which needs exceptions to shut down the application in an ordered way, and for these relying on PHPs way to handle the autoloading error.Sure, it would be possible. But that would also be a BC break. It may be worth it (not sure), but still. An interesting idea...