Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87794 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69707 invoked from network); 19 Aug 2015 11:31:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2015 11:31:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.221 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.221 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.221] ([81.169.146.221:51170] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/94-54915-3F864D55 for ; Wed, 19 Aug 2015 07:31:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1439983856; l=4448; s=domk; d=kelunik.com; h=Content-Type:Cc:To:From:Subject:Date:References:In-Reply-To: MIME-Version; bh=dP0nHooR9GvdlaRBnNFn0xy2j3SoeufbLhhy0ie2uPc=; b=UQQAYcHnVMErFtqTi9Vlxw0sFhNuzdFO58BX371JscYWjKsbZ7ltsYEXgWgCpFTHdg/ Ko+OAsRiWD1HLbor9L5c0ubiUxlPMo2yGMHH/70nqu8JrMkfnSLPCR+h/jrveEx2GZ65u xX0ZXvbyXrWqFtS3VHGFLsRxV9FRlqSmMRU= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuoNKBqX63Q== X-RZG-CLASS-ID: mo00 Received: from mail-la0-f42.google.com ([209.85.215.42]) by smtp.strato.de (RZmta 37.9 AUTH) with ESMTPSA id C02663r7JBUujq4 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate) for ; Wed, 19 Aug 2015 13:30:56 +0200 (CEST) Received: by lahi9 with SMTP id i9so993903lah.2 for ; Wed, 19 Aug 2015 04:30:56 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.142.196 with SMTP id ry4mr10832413lbb.68.1439983856409; Wed, 19 Aug 2015 04:30:56 -0700 (PDT) Received: by 10.114.98.104 with HTTP; Wed, 19 Aug 2015 04:30:56 -0700 (PDT) In-Reply-To: <55D45278.5050005@telia.com> References: <20150817123142.13418f26@csystems> <20150817131900.66906015@csystems> <55D1EE8E.9030603@php.net> <55D45278.5050005@telia.com> Date: Wed, 19 Aug 2015 13:30:56 +0200 Message-ID: To: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Cc: PHP internals , Peter Cowburn Content-Type: multipart/alternative; boundary=089e0112bf7e3e6603051da85e50 Subject: Re: [PHP-DEV] set_exception_handler catches all Throwables From: me@kelunik.com (Niklas Keller) --089e0112bf7e3e6603051da85e50 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 bre= ak >>>> 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 >>> >>> What's the plan for set_exception_handler() regarding Throwables? Seein= g >> as >> we're now in the RC release phase I think this bone of contention should >> be >> resolved one way or another as soon as we can. >> > Yes, a "global" function that behaves differently between PHP 5 & 7 is no= t > optimal in > my view. I'm also wondering how to make one handler managing two > different type > of situations. @ircmaxwell described it in *Core functions throwing > exceptions in PHP7*: > "Errors signify programmer error, where Exceptions signify > unknown or runtime errors. Meaning that an Error should always be a > problem with your code, but an Exception could be a systems problem, a > user problem or a problem in your code." > > /Cheers //Bj=C3=B6rn Larsson/ > > PS A bit new to this list but hope to have contributed a little :) > > --089e0112bf7e3e6603051da85e50--