Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84008 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75299 invoked from network); 27 Feb 2015 14:48:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Feb 2015 14:48:07 -0000 Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 209.85.212.176 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 209.85.212.176 mail-wi0-f176.google.com Received: from [209.85.212.176] ([209.85.212.176:43172] helo=mail-wi0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 46/F2-32582-3A380F45 for ; Fri, 27 Feb 2015 09:48:05 -0500 Received: by wivr20 with SMTP id r20so727412wiv.2 for ; Fri, 27 Feb 2015 06:48:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Vk/yPfOLUXqCZsVSMc5Y3QSfNBACgtEygaeYAiKtAZg=; b=PUrKCa7dgkuANcK2zFISZxco9L/SBKZRlp5saHuO+G/xwysm7i4rwSqUy02zkxT7WF /A3LEDAPQEQ4jYriZtBcGIMxpIxTwrQ7Fyj66/ks3I/hTLQKiLjLcJyhEzssRfMDaEt2 oIC0ReOCmCSlhoYEuplY7E8KDQh/cT6cUuY2ZCuekxsADiuTrOR/LOaMGc+EgWyEdRMY GI7aRD5LxK172NMWKEVosGv8GboRpQM70A2NX5zFeRqAoVXfr/R1wb0KW/I+JmTZW2Z4 zCWW64X40RhM/mHVABVSOa/xxPwpUyfQJvwHAscYTWMAsEkSuXu5agN9ZVdc3ayYk9WP wznw== X-Gm-Message-State: ALoCoQnVJ6Xr14zBRF6F01sbI00e4FltziklwXeuSJPEjCuCKU0b7kUBWS7MHwsrZtrUrqLBqX23 X-Received: by 10.194.209.237 with SMTP id mp13mr1740472wjc.120.1425048479138; Fri, 27 Feb 2015 06:47:59 -0800 (PST) Received: from [146.90.233.222] (222.233.90.146.dyn.plus.net. [146.90.233.222]) by mx.google.com with ESMTPSA id kr5sm6304845wjc.1.2015.02.27.06.47.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 06:47:57 -0800 (PST) Message-ID: <54F0839C.3010700@seld.be> Date: Fri, 27 Feb 2015 14:47:56 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: internals@lists.php.net References: <54F07FC7.8050901@php.net> In-Reply-To: <54F07FC7.8050901@php.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Exceptions in the engine From: j.boggiano@seld.be (Jordi Boggiano) On 27/02/2015 14:31, Sebastian Bergmann wrote: > Am 23.02.2015 um 19:15 schrieb Nikita Popov: >> Voting on the engine exceptions RFC, which proposes to convert existing >> fatal and recoverable fatal errors into exceptions, has opened: >> >> https://wiki.php.net/rfc/engine_exceptions_for_php7#vote >> >> The primary vote requires a 2/3 majority, as this is a language change. >> >> A second vote will decide whether to use a BaseException based inheritance >> hierarchy. This vote uses a simple majority. > > I have voted yes on "Allow exceptions in the engine and conversion of > existing fatals?" and no on "Introduce and use BaseException?" and > would like to elaborate on the latter. > > I am sorry that I was unable to raise this concern earlier (did not > really become aware of the RFC before it was put to the vote), but I > would prefer the following: > > * Introduce a Throwable interface > * Let Exception implement the Throwable interface > * Introduce an Error class that implements the Throwable interface > * Use Error class as base class for exceptions raised by the engine > > This would be along the lines of what Java does. +1 on that, and as it seems the BaseException is going to pass, it might be good to quickly draft another RFC to amend that part. It seems people in general favor the fact that catch(Exception $e) does not catch those new engine exceptions, but there hopefully would not be much resistance against a cleaner scheme than a BaseException class. Also the Error (and possibly Throwable) class/interface might be put in a PHP namespace and then we avoid any potential BC issues, but that's perhaps another voting point :) Cheers