Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87800 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7472 invoked from network); 19 Aug 2015 13:55:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2015 13:55:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=derokorian@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=derokorian@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.169 as permitted sender) X-PHP-List-Original-Sender: derokorian@gmail.com X-Host-Fingerprint: 209.85.192.169 mail-pd0-f169.google.com Received: from [209.85.192.169] ([209.85.192.169:33195] helo=mail-pd0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 59/78-54915-7CA84D55 for ; Wed, 19 Aug 2015 09:55:19 -0400 Received: by pdrh1 with SMTP id h1so2010385pdr.0 for ; Wed, 19 Aug 2015 06:55:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Kbg4BCJUdECCwLyJr1nziiVWZY46BMsEqf5OUa4qi60=; b=09fCTi9WPzIKP8eQuwUSjRuTz5qim3IY0QRDoC0nxREapFu+tehRdnspAy+/XEAJSU vgVT8AVEyBlMNXy3AEAcVyiei+d+U3lolCFdlDsIav802z0BV08cuobnAsrjCM/m2J1R F3wQTDHGEY7vPpGNrsb6WeMmbtEabUPt94y4c80TbYp49WRWetr8Ftx6a9jOwFqm7kH4 UudAtGtY20u7FDcaoSzoNhY0i6QhEG6OCCmwzS67Ez+3sULwEAKBj6bozy5gQt6tTLww Ymsuse0BL+y4fe19YpMg76ijFghA0crXwAC+BfmZ2NmkqACRAjlmVgyu5dY2vPVdIfpx plZg== MIME-Version: 1.0 X-Received: by 10.70.135.198 with SMTP id pu6mr6794120pdb.159.1439992516489; Wed, 19 Aug 2015 06:55:16 -0700 (PDT) Received: by 10.66.15.37 with HTTP; Wed, 19 Aug 2015 06:55:16 -0700 (PDT) In-Reply-To: <55D479F1.5000408@telia.com> References: <20150817123142.13418f26@csystems> <20150817131900.66906015@csystems> <55D1EE8E.9030603@php.net> <55D45278.5050005@telia.com> <55D479F1.5000408@telia.com> Date: Wed, 19 Aug 2015 07:55:16 -0600 Message-ID: To: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Cc: Niklas Keller , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a11331a606cbd5c051daa6281 Subject: Re: [PHP-DEV] set_exception_handler catches all Throwables From: derokorian@gmail.com (Ryan Pallas) --001a11331a606cbd5c051daa6281 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Aug 19, 2015 6:44 AM, "Bj=C3=B6rn Larsson" w= rote: > > Plan to migrate to PHP 7 later, like the new Exception/Error way > of working very much. Point is that current set_exception_handler > only address exceptions, not errors. You are right that on that the > surface it's the same callback, but could eg be logging in different > ways and to different recipients. Will look into it more later. > > Regards, //Bj=C3=B6rn > > > Den 2015-08-19 kl. 13:30, skrev Niklas Keller: >> >> What do you guys do in the set_exception_handler callback? Wouldn't most code just use the same callback and just log the error / exception? >> >> Regards, Niklas >> >> 2015-08-19 11:55 GMT+02:00 Bj=C3=B6rn Larsson >: >> >> >> Den 2015-08-19 kl. 10:52, skrev Peter Cowburn: >> >> On 17 August 2015 at 15:24, Sebastian Bergmann >> wrote: >> >> Am 17.08.2015 um 16:00 schrieb Derick Rethans: >> >> Actually, I don't call this intended. This is just as >> much as a BC break >> as the original implementation where Errors where also >> Exceptions. IMO, >> set_exception_handler() should be changed - with my >> preference it not >> capturing Error, and instead have an additional >> set_throwable_handler(). >> >> +1 >> I agree with this completely. I think the point here is that catch(Exception $e) remains unchanged while setting a handler actually catches more things now. Tbh I feel like this is an oversight in implementing the Error/Throwable rfc and should be addressed now, otherwise it can't be changed until 8 if I understand correctly. --001a11331a606cbd5c051daa6281--