Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87482 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65447 invoked from network); 1 Aug 2015 09:37:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Aug 2015 09:37:48 -0000 Authentication-Results: pb1.pair.com header.from=markus@malkusch.de; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=markus@malkusch.de; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain malkusch.de designates 31.47.225.241 as permitted sender) X-PHP-List-Original-Sender: markus@malkusch.de X-Host-Fingerprint: 31.47.225.241 malkusch.de Received: from [31.47.225.241] ([31.47.225.241:57512] helo=malkusch.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/21-54109-B639CB55 for ; Sat, 01 Aug 2015 05:37:48 -0400 Received: from x5ce10ad4.dyn.telefonica.de ([92.225.10.212] helo=[192.168.1.90]) by malkusch.de with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.84) (envelope-from ) id 1ZLTEe-0004xV-LL; Sat, 01 Aug 2015 11:37:44 +0200 Message-ID: <55BC9361.1080804@malkusch.de> Date: Sat, 01 Aug 2015 11:37:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Stephen Coakley , internals@lists.php.net References: <55BBD019.5030106@stephencoakley.com> <55BC201D.6010600@malkusch.de> In-Reply-To: <55BC201D.6010600@malkusch.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -1.0 X-Spam-Score-Int: -9 X-Spam-Level: - Subject: Re: [PHP-DEV] Re: Throwable::addSuppressed() From: markus@malkusch.de (Markus Malkusch) Markus Malkusch: > 2) You are loosing one stack trace I'd like to revise that. I'd just learned that finally does indeed fit here, as it would automatically glue exceptions: try { throw new Exception("A"); } finally { throw new Exception("B"); } This prints both exceptions: PHP Fatal error: Uncaught exception 'Exception' with message 'A' in /home/malkusch/tmp/test.php:4 Stack trace: #0 {main} Next exception 'Exception' with message 'B' in /home/malkusch> /tmp/test.php:7 Stack trace: #0 {main} So B's previous became A. Well I'm surprised, as there's no causality between them, but OTOH it's called Exception::getPrevious() without any further semantics. So this might be acceptable. Unfortunately this reduces the justification for Throwable::addSupressed() only to catch blocks. Markus Malkusch