Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77795 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52963 invoked from network); 7 Oct 2014 09:32:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Oct 2014 09:32:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.180 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.180 mail-qc0-f180.google.com Received: from [209.85.216.180] ([209.85.216.180:41411] helo=mail-qc0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/26-30869-713B3345 for ; Tue, 07 Oct 2014 05:32:08 -0400 Received: by mail-qc0-f180.google.com with SMTP id x3so5152352qcv.25 for ; Tue, 07 Oct 2014 02:32:05 -0700 (PDT) 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=wnX758Ov51JKepRbZq446LB04CUwPRKG5itSPuDDAsA=; b=Vgh59/f2IgO9l9y1rquvXy8f1u503xCiFx1NXqeszQ78y21veMmxLLsgkooyUF80CE KJ0ySbEXxg+a6R0ESQz36NEvZVvbSEc/Y9GQjXYkJKt2+Wqd2/0g2nS7/cKPtAOxpjD1 DE49xLOnA8L/Djxbij0uNeuv6g0PWOTfSloEwAUYiMrV1aELcurahesvkid2zEktaGCY +3rpmN6MM/1hOVQU+dSgrUvztnnrYY8ZoD1YAsTJyBGmSqRymlz5I2FoIzm/vYJax+Yh ZRCwW0uF3CSZyqJ/6+NV69EykT9iSGzYKTCHMSl0dZFemBrWJ449/TEJKeNQCB6gf0NV utSw== MIME-Version: 1.0 X-Received: by 10.224.37.69 with SMTP id w5mr2463046qad.67.1412674325231; Tue, 07 Oct 2014 02:32:05 -0700 (PDT) Received: by 10.140.107.130 with HTTP; Tue, 7 Oct 2014 02:32:05 -0700 (PDT) In-Reply-To: References: <543320AB.4070606@sugarcrm.com> Date: Tue, 7 Oct 2014 11:32:05 +0200 Message-ID: To: Dan Ackroyd Cc: Stas Malyshev , Nikita Popov , PHP internals Content-Type: multipart/alternative; boundary=001a11c1c9c856bda10504d1df86 Subject: Re: [PHP-DEV] [RFC] Exceptions in the engine From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c1c9c856bda10504d1df86 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Oct 7, 2014 at 10:55 AM, Dan Ackroyd wrote= : > Stas wrote: > > > The only issue I think we need to discuss is catch(Exception $e). Now i= t > > would catch much more than before, if we do no changes. > > It's not clear why would that be an issue - can you specify what the > problem would be? > > Also, if we changed `catch(Exception $e)` to not catch all exceptions, > than we would need to have another way of specifying that a catch > block should catch all exceptions. Which would involve either making > \Exception extend another even 'baser' Exception, or a hack to the > syntax e.g. something like: > > catch($e) { > // Catch without Exception type catches all exceptions > // and confuses people. > } > we discussed this before on the mailing list, the problem would be that currently the fatal errors will stop the execution and even recoverable fatals for most people (when they don't have a global error handler defined to handle it) and theoretically it is possible that some code exists out there with Pokemon Exception Handling ( http://c2.com/cgi/wiki?PokemonExceptionHandling) where the code would continue the execution and probably does some logically faulty operation which previously was only prevented by the fatal error stopping the code. this indeed assumes that the user already follow bad coding practices(Catch them all) and code with (potential) fatal errors so there were a disagreement if we could afford this BC or not. Personally I think that it would be fine for a major version. > > --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c1c9c856bda10504d1df86--