Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86295 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55532 invoked from network); 18 May 2015 15:39:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2015 15:39:09 -0000 Authentication-Results: pb1.pair.com header.from=morrison.levi@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=morrison.levi@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.174 as permitted sender) X-PHP-List-Original-Sender: morrison.levi@gmail.com X-Host-Fingerprint: 209.85.213.174 mail-ig0-f174.google.com Received: from [209.85.213.174] ([209.85.213.174:34414] helo=mail-ig0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 69/73-24313-B970A555 for ; Mon, 18 May 2015 11:39:07 -0400 Received: by igbhj9 with SMTP id hj9so12666822igb.1 for ; Mon, 18 May 2015 08:39:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=R/Sy8YFPK/w0ShtooqDw/SUokCjTmrxXOMpaoVLoYQs=; b=HlAkQXR6uoHBgawVbNK4CcKLp90jx49MxsvFu/W6r1O5VYV/wsb92XJfpPbvuXhAYi kl6VTcMvqAje7yI+rX4yUNQrq9f0I0H+aCaAEPDPZVVMky86yILUCXRHVNBp6Q9K/fEn /pdW0hkdj973VNc/uzhtm1C/uai8RBUK1tNL1WMLETysZZbM6ibd9dWA7UzyY+TUNT7/ +7Xl5irEoXG14MEfX9vmdfpk3DjR5W9/79tP8BQsPsRw2AIBf6bG43kdNJoAzUGmOSr5 GSeGV8f/c76El2xBogU9yQH1ktR9aoWzD8LJ1t08TS/mCjg4wuSHVO+QyUNwhfZij4Jt +n6g== MIME-Version: 1.0 X-Received: by 10.50.6.37 with SMTP id x5mr15316233igx.45.1431963544101; Mon, 18 May 2015 08:39:04 -0700 (PDT) Sender: morrison.levi@gmail.com Received: by 10.79.98.67 with HTTP; Mon, 18 May 2015 08:39:03 -0700 (PDT) In-Reply-To: References: <554D8F4D.9020903@gmail.com> <554D90CC.3040607@php.net> <5552E3EB.5010800@gmail.com> <5552E494.5070401@php.net> <5552FF58.8070807@php.net> <55575DCF.50801@gmail.com> <55578C61.3040408@gmail.com> <555796C0.2020002@gmail.com> <5557A5C6.5050701@gmail.com> <877A3955-C72C-4DB0-9B4D-E2891EE55095@gmail.com> Date: Mon, 18 May 2015 09:39:03 -0600 X-Google-Sender-Auth: se2d2T4sfWGm7tdsxxxUQH_eZLw Message-ID: To: Rowan Collins Cc: internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [VOTE] Exceptions in the engine From: levim@php.net (Levi Morrison) On Sun, May 17, 2015 at 11:44 AM, Rowan Collins w= rote: > On 17 May 2015 16:02:40 BST, Levi Morrison wrote: >>In this specific case we have broken all code out there. > > Yes, in the very specific case of people who both caught all exceptions a= nd handled all E_RECOVERABLE errors, the existence of Throwable introduces = a slightly worse BC break than without it. > > For code that catches all exceptions but doesn't handle any errors (which= seems perfectly reasonable to me), it improves BC, as they will catch only= the same exceptions they already did. > > It's also worth looking at the feature in its own right: if we didn't hav= e any BC concerns, would it seem useful to be able to catch either all user= land exceptions or all system exceptions, or both? If you were defining fro= m scratch you could have UserException and EngineException extending Except= ion, but we can't change existing uses of Exception, so Exception and Error= implementing Throwable gives us the same split. I'm not sure I would have separated them this way. I wouldn't group TypeException in the same subtree as ParseException, for instance. One happens at compile time and the other at run time, which means the intent in what you catch is probably quite different.