Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87810 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70769 invoked from network); 19 Aug 2015 18:15:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2015 18:15:42 -0000 Authentication-Results: pb1.pair.com header.from=adam@adamharvey.name; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=adam@adamharvey.name; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain adamharvey.name designates 209.85.217.171 as permitted sender) X-PHP-List-Original-Sender: adam@adamharvey.name X-Host-Fingerprint: 209.85.217.171 mail-lb0-f171.google.com Received: from [209.85.217.171] ([209.85.217.171:33896] helo=mail-lb0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BE/01-56231-CC7C4D55 for ; Wed, 19 Aug 2015 14:15:41 -0400 Received: by lbbtg9 with SMTP id tg9so8777957lbb.1 for ; Wed, 19 Aug 2015 11:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamharvey.name; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=Mu9Pem9IFVeZEM4SVnhPP9WJJcBZAWurZSb4jliyPno=; b=v/C87M3194RIsedvO9A+WPupx13dlJWzJ5I1XhOeZWwkaJ/ZzlmUUwvuX5HqNvGWMA 9yI+dOhAOCUqrQ8Rrb6fl97whEFbiq/Sw6wNs6LGvFwDr7HS01MY1wGFGxglS64LIuaV uqCIkz91fvjOXND3QNdcFEp6ZpHl0T6BmfE3M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Mu9Pem9IFVeZEM4SVnhPP9WJJcBZAWurZSb4jliyPno=; b=GTL5HgWM/Ri1Y8YbygahVxWfLXjTqpbUt0fpRzN4F/npDWcfcpY0iZoprUrvjEoaNn seZpASkoYCdPTdYE7ta4uz+OQv49dxjzFIyFxSXjP1KFrmmwU0NSfSsx3TpZZe8Y2Kl1 UFx8SFUHvfpI9h+WzKe/G2UzsLW0B2YE+EBOXWqRtSQwgjhG0WJ1SBURCjEHBpvK8ga5 OO+MTRrcA4NEY/HGSOkjpSwyEbZGTOsrCXQwnls/qNt/qofDGcrW+pXm21ltNxVzyiRG UZs9wc2BbEU+rsUfTGzc9FeJBVlxsRtRcMxs4IlITt8QQpZddhs2A8F03AiYXrQZXzhu vb+w== X-Gm-Message-State: ALoCoQlBg9Osk0IZmaMTVwpniGX3QOmElWYc3eVaCRBrOGtND+Rcxxi5AzeblXQ83jUEGF1yYLin X-Received: by 10.112.47.73 with SMTP id b9mr12635858lbn.46.1440008137275; Wed, 19 Aug 2015 11:15:37 -0700 (PDT) MIME-Version: 1.0 Sender: adam@adamharvey.name Received: by 10.25.159.70 with HTTP; Wed, 19 Aug 2015 11:15:17 -0700 (PDT) In-Reply-To: <55D490AB.7030507@telia.com> References: <20150817123142.13418f26@csystems> <20150817131900.66906015@csystems> <55D1EE8E.9030603@php.net> <55D45278.5050005@telia.com> <55D479F1.5000408@telia.com> <55D490AB.7030507@telia.com> Date: Wed, 19 Aug 2015 11:15:17 -0700 X-Google-Sender-Auth: VOQ3GHrFVvdH76mcSYpjMg9QwxY Message-ID: To: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Cc: Ryan Pallas , PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] set_exception_handler catches all Throwables From: aharvey@php.net (Adam Harvey) On 19 August 2015 at 07:20, Bj=C3=B6rn Larsson = wrote: > Den 2015-08-19 kl. 15:55, skrev Ryan Pallas: >> 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, otherw= ise >> it can't be changed until 8 if I understand correctly. >> > This is also a view that I share, feels more consistent that the handler > mimics v5 and catch(Exception $e) behaviour. Hope there can be a > decision / consensus on this topic. I think this is absolutely an improvement, for what it's worth. set_exception_handler(), by definition, is a last resort handler that should be getting used primarily for logging and cleaning up, since execution stops once it's done. What I don't want is another path that has to be monitored to make sure you catch every error/exception case that terminates execution. Two callbacks is already arguably one too many, and just excluding non-Exception Throwable objects and letting them fall through to the error handler feels like we did a lot of work for little practical reward. Adam