Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86284 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20359 invoked from network); 17 May 2015 05:07:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 May 2015 05:07:33 -0000 Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.238 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.238 mail-2.de-punkt.de Received: from [93.190.64.238] ([93.190.64.238:36644] helo=mail-99.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/C4-14891-31228555 for ; Sun, 17 May 2015 01:07:32 -0400 Received: from localhost (localhost [127.0.0.1]) by mail-99.de-punkt.de (Postfix) with ESMTP id 24B553A2CE for ; Sun, 17 May 2015 07:07:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail-2.de-punkt.de Received: from mail-99.de-punkt.de ([127.0.0.1]) by localhost (mail-2.de-punkt.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OMIBctBNDneE for ; Sun, 17 May 2015 07:07:29 +0200 (CEST) Received: from [192.168.178.23] (p57BDEC26.dip0.t-ipconnect.de [87.189.236.38]) (Authenticated sender: php@sebastian-bergmann.de) by mail-99.de-punkt.de (Postfix) with ESMTPSA id A820C3A1DD for ; Sun, 17 May 2015 07:07:28 +0200 (CEST) Message-ID: <55582210.9060908@php.net> Date: Sun, 17 May 2015 07:07:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: internals@lists.php.net References: <5557AF50.3060203@gmail.com> In-Reply-To: <5557AF50.3060203@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Throwable patch(es) and finalizing the story From: sebastian@php.net (Sebastian Bergmann) On 05/16/2015 10:57 PM, Stanislav Malyshev wrote: > I am assuming we have broad consensus about the move from BaseException > to Throwable. I've looked at the patch at > https://github.com/php/php-src/pull/1282 and it seems pretty close to > what we want to me. The only difference is that > https://wiki.php.net/rfc/throwable says Throwable is an interface and > this patch makes it abstract class It is supposed to be an interface. It it's not then it's a mistake in the patch. I strongly believe that the hierarchy for exceptions thrown by the engine must be separate from the hierarchy for exception thrown by userland code (and "regular" extensions such as Reflection, etc.). The whole purpose of the Throwable interface is to mark objects of both hierarchies as throwable. Whether we name the base class of the hierarchy for exceptions thrown by the engine Error or EngineException, I don't really care. But Error feels more right to me than EngineException. I do care, though, about the fact that userland code (and "regular" extensions such as Reflection, etc.) must not throw engine exceptions.