Re: [VOTE] Exceptions in the engine

From: Date: Sat, 16 May 2015 14:40:35 +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  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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.

So either way it is a BC break. So let's consider other impact to help decide:

If we introduce a new root exception then the people "punished" are
the ones currently using Exception correctly. Whereas if engine
exceptions just extend Exception then the people "punished" are the
ones using it inappropriately.

Please, revert all of these changes with Error and some new root
exception and *do the right thing* based on logical arguments. It
makes no sense to punish the people using code correctly to avoid
punishing people misusing a feature, especially when it is a BC break
either way.


Thread (75 messages)

« previous php.internals (#86245) next »