Hi
.. snip ..
Hm... so there should never have the normal available?
I need to think over this again then. While I tend to agree with
autoloader never triggering errors or exceptions, the debug mode is
the unique way to notice if user during developer haven't done any
mistake.
Maybe we can only keep the RuntimeException and debug mode
possibility, remove the normal and keep it always silent. What do
you
think?
I think that an exception to this request could be made for the DEBUG
mode (as the way you're doing it is pretty much the only way you
could
identify that). Perhaps changing the exception to a warning or
notice
(as you wouldn't want that in prod), but I could live with the error
in debug mode as it shouldn't be used outside of testing and dev
work.
I was more referring to errors/exceptions in normal usage...
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.
Cheers
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php