On 16/05/2015 15:40, Levi Morrison wrote:
I want to talk about the BC impact of what has been discussed.

Currently the meaning of this code is to catch all possible
exceptions, because all exceptions *must* extend `\Exception`:

     } catch (Exception $e) {

By making some other root exception you just broke all the code that
is *appropriately* using the catch-all variant.

That's not quite true. Currently, any code that catches all exceptions will still issue fatal errors for, for instance, an undeclared class. With a BaseException/Throwable, this behaviour will remain unchanged - the error messages reported will be slightly different, but they will still propogate to fatal errors, because the exception will be uncaught.

Now, whether catching the extra exceptions would make the code better or worse depends entirely on the nature of the code, but it's hard to see how code whose behaviour is completely unchanged can be considered "broken" by the proposed hierarchy.

Please, revert all of these changes with Error and some new root
exception and*do the right thing*  based on logical arguments.

This was the subject of a separate vote in the RFC, which passed by 39 votes to 19. https://wiki.php.net/rfc/engine_exceptions_for_php7 The subject of discussion at present is the exact naming of the various classes/interfaces, not the general nature of the hierarchy.

Regards,

--
Rowan Collins
[IMSoP]


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to