Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:70521 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 3147 invoked from network); 7 Dec 2013 17:05:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Dec 2013 17:05:26 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.174 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.223.174 mail-ie0-f174.google.com Received: from [209.85.223.174] ([209.85.223.174:38208] helo=mail-ie0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/20-01020-35553A25 for ; Sat, 07 Dec 2013 12:05:23 -0500 Received: by mail-ie0-f174.google.com with SMTP id at1so3409431iec.5 for ; Sat, 07 Dec 2013 09:05:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PMciL/rawNH36dUukxULBUlMh+HAnSC5OZ0rxVkoXxw=; b=BQZSu68LDT3T/c33K848RJoAd3AjvJg1EXQ+GZOb1/MuQcRzCvkuS1kQtbqnBzkZ4l Pc2hiFVBXVzz4eNnco/rn4ga8mB/PwXEjMmNvfecWuQ0bXte9I2Q1G4Pe+y6xyYpconP KWv5jVot4EM4npESbLRMMmcUmM879lbpRRd7qLv36Aqf4X00OTwrxAP3M4mMM5QJ4yU7 /+jjWzhjxH4SMYFtYm8Rx3GbgIQFomj0/vl6IsDAUt/LxbbprBnNDFuN2pAxxWuBJEs7 WGFlL+8K38cE+yzIgxVazgGw+Z5k/rXiAQE+SfMamif5teqnvR8+EsYIm5MPLbZT1IZl NVWA== MIME-Version: 1.0 X-Received: by 10.42.196.201 with SMTP id eh9mr27399251icb.39.1386435920267; Sat, 07 Dec 2013 09:05:20 -0800 (PST) Received: by 10.50.73.42 with HTTP; Sat, 7 Dec 2013 09:05:20 -0800 (PST) In-Reply-To: References: Date: Sat, 7 Dec 2013 18:05:20 +0100 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=90e6ba5bc98b88107b04ecf4c438 Subject: Re: [PHP-DEV] [VOTE] Allowing use of exceptions in the engine From: tyra3l@gmail.com (Ferenc Kovacs) --90e6ba5bc98b88107b04ecf4c438 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Dec 7, 2013 at 1:57 PM, Nikita Popov wrote: > Hi internals! > > 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 proposa= l > without BC issues. > > Some further notes: > * I will not be including something like BaseException. Introducing it f= or > 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 B= C > [1] even without it, I don't see a reason to introduce it. > * 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 f= ix > something like the SPL exception mess later. > * The suggested uncaught exception error message change is just a bit of > cosmetics (and not directly related to this proposal), so I'd like to do > that separately. > > And regarding the vote: If you are in favor of the proposal in general, b= ut > 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. > > Thanks, > Nikita > > [1]: We don't have a formal definition for this, but it seems to be gener= al > consensus that relaxing error conditions does not constitute a backwards > compatibility break. > personally I have seen catch-all blocks in the wild (try {//do something} catch(Exception $e) {//do nothing}), which would behave differently (and some of them would screw something up instead of terminating the app) if the EngineException is a subclass of Exception. I can see myself supporting this proposal for 5.6, if we can have it done in a truly BC-safe manner, but I can understand, if the required compromises for that would make the feature too "clunky", so maybe it would be better to introduce it in a major version. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --90e6ba5bc98b88107b04ecf4c438--