Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86248 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25531 invoked from network); 16 May 2015 15:10:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 May 2015 15:10:17 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.48 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.48 mail-wg0-f48.google.com Received: from [74.125.82.48] ([74.125.82.48:33648] helo=mail-wg0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/64-14891-7DD57555 for ; Sat, 16 May 2015 11:10:16 -0400 Received: by wgin8 with SMTP id n8so144721435wgi.0 for ; Sat, 16 May 2015 08:10:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Iq68oyKuxUHSG9iqXI1zq9M11ADyopufs3oSrPuLoYA=; b=WN40UyKS/Hu/xm5DkAg6lvJGkLyoCPIFeHzJvthbNIqS9b7apLDLn1xNs/KB1GOIm0 1PtlXPIp4PgFkorwbsouxfUuKvxDpkA2z7jaKTyeBYefXdMPoDmEBaA/meJcMtq5E2QC 8ICICAvyGLhqDM3sNbwwog6wHQHVdF6548UoxSgtzqLLC31EGmn4vRlkpQ0yRtXt+jCT xvTKjIp4kMkuaXPCYaef7Ko4rTPIRjMWd/7HkumqwnsMaI2ELP+lD4zTj1W9wYkXR4xJ 7BCOtu/0gHnVUOiFWWeThBIQmtNnp7QR/ELh7iTexlfJuSf27dr+9bJ6Fw0lgA5plM35 VNkw== X-Received: by 10.180.82.73 with SMTP id g9mr6722929wiy.87.1431789013151; Sat, 16 May 2015 08:10:13 -0700 (PDT) Received: from [192.168.0.5] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by mx.google.com with ESMTPSA id eu10sm892289wib.8.2015.05.16.08.10.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 May 2015 08:10:11 -0700 (PDT) Message-ID: <55575DCF.50801@gmail.com> Date: Sat, 16 May 2015 16:10:07 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54F07FC7.8050901@php.net> <54F0839C.3010700@seld.be> <55052FAD.6090608@php.net> <5505346D.7020700@php.net> <550DA4EE.2030903@php.net> <55410973.4010300@php.net> <55417C64.7000707@gmail.com> <5541B4D6.9060503@php.net> <55425D7E.6010803@gmail.com> <554D8F4D.9020903@gmail.com> <554D90CC.3040607@php.net> <5552E3EB.5010800@gmail.com> <5552E494.5070401@php.net> <5552FF58.8070807@php.net> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Exceptions in the engine From: rowan.collins@gmail.com (Rowan Collins) On 16/05/2015 15:40, Levi Morrison wrote: > 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. That's not quite true. Currently, any code that catches all exceptions will still issue fatal errors for, for instance, an undeclared class. With a BaseException/Throwable, this behaviour will remain unchanged - the error messages reported will be slightly different, but they will still propogate to fatal errors, because the exception will be uncaught. Now, whether catching the extra exceptions would make the code better or worse depends entirely on the nature of the code, but it's hard to see how code whose behaviour is completely unchanged can be considered "broken" by the proposed hierarchy. > Please, revert all of these changes with Error and some new root > exception and*do the right thing* based on logical arguments. This was the subject of a separate vote in the RFC, which passed by 39 votes to 19. https://wiki.php.net/rfc/engine_exceptions_for_php7 The subject of discussion at present is the exact naming of the various classes/interfaces, not the general nature of the hierarchy. Regards, -- Rowan Collins [IMSoP]