Re: [VOTE] Allowing use of exceptions in the engine

From: Date: Sat, 07 Dec 2013 21:47:20 +0000
Subject: Re: [VOTE] Allowing use of exceptions in the engine
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-70523@lists.php.net to get a copy of this message
On 7 December 2013 04:57, Nikita Popov <nikita.ppv@gmail.com> wrote: > I opened the vote on the "Exceptions in the engine" RFC: > > https://wiki.php.net/rfc/engine_exceptions#vote > > The vote has three options, "Yes", "No" and "Yes, without > E_RECOVERABLE_ERROR changes". The last option is a version of the proposal > without BC issues. > > And regarding the vote: If you are in favor of the proposal in general, but > want to have it in PHP 6 rather than PHP 5.6, then vote "No" here. If it > fails now, someone can revive this once the time for PHP 6 has come. To be clear: I've voted -1 for exactly this reason, and this reason alone. I don't think implementing this piecemeal (without the E_RECOVERABLE_ERROR changes) is the right way to go — I would prefer to have the whole thing as part of a 6.0 release, rather than potentially confusing users with a partial implementation. Notes on the notes: > * I will not be including something like BaseException. Introducing it for > this purpose seems like bad design and will be very hard to get rid of in > the future. As the proposal (without recoverable errors) does not break BC > [1] even without it, I don't see a reason to introduce it. +1. I think I said last time that it felt like the mysql_real_escape_string() of exception API design. :) > * Some people suggest to use different subclasses of EngineException for > different error types. I'm not against that, but I think it's okay to do > that in a separate proposal, if someone can come up with a good selection > of exception classes. It's much easier (and does not break BC) to add > subclassing later, than to add suboptimal subclass types now and try to fix > something like the SPL exception mess later. Also +1. Adam

« previous php.internals (#70523) next »