Re: [VOTE] Exceptions in the engine
| From: | Rowan Collins | Date: | Sat, 16 May 2015 15:10:07 +0000 |
| Subject: | Re: [VOTE] Exceptions in the engine | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86248@lists.php.net to get a copy of this message | ||
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* extendThat'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.\Exception:} catch (Exception $e) {By making some other root exception you just broke all the code that is *appropriately* using the catch-all variant.
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]