Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87811 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73993 invoked from network); 19 Aug 2015 18:45:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2015 18:45:46 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.52 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.52 mail-pa0-f52.google.com Received: from [209.85.220.52] ([209.85.220.52:35515] helo=mail-pa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2B/81-56231-7DEC4D55 for ; Wed, 19 Aug 2015 14:45:44 -0400 Received: by pacdd16 with SMTP id dd16so360150pac.2 for ; Wed, 19 Aug 2015 11:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Cxe4+jpO8hkon4VmNuXL/JqriLbBgBQCkcpY6+bbC08=; b=hGp2yTTGmjHO/XPsdEeLJ5st/hWCRWWptvM5J1MaeJUz6WQ7Gs6qfZQpWjpnws4B9X yjYB/AwFoC6Uu7wU3Mc4OG2Qned+4BFnT64k/JfWfX2nbclkejqcdOdao61hOjPJJyAS eaX5462dfju2CSoIN8DhmUnC60uEksWLYCHuAdEmTY2mhyGaqc1bKVNsmFGYT4DAPE3W OB0qenmnowgG9YFxvOK8K3zyh/m/1Sh7Trq0W1G5WyH3/LgGOWfos4lowokS52kBOM2j 95uB5Sxdc/9oJEVFq+J/RrWCGVRYX9NVe8LRj8jZZviQZQqUF0BiTBdt/RQAllX10I59 jgTQ== X-Received: by 10.68.138.200 with SMTP id qs8mr27876768pbb.19.1440009940834; Wed, 19 Aug 2015 11:45:40 -0700 (PDT) Received: from Stas-Air.local ([156.39.191.244]) by smtp.gmail.com with ESMTPSA id mc1sm1695488pdb.14.2015.08.19.11.45.38 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 19 Aug 2015 11:45:39 -0700 (PDT) To: Derick Rethans , Christian Weiske References: <20150817123142.13418f26@csystems> <20150817131900.66906015@csystems> Cc: Niklas Keller , PHP Internals Message-ID: <55D4CED2.4090201@gmail.com> Date: Wed, 19 Aug 2015 11:45:38 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] set_exception_handler catches all Throwables From: smalyshev@gmail.com (Stanislav Malyshev) Hi! > 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(). Could you explain why? As I understand, set_exception_handler() is needed to provide a backstop for the cases when all else fails and allow for ordered shutdown, nice error message, logging, etc. With this in mind, catching all Throwable's is well within this function. So what would be the case for having two separate functions for this task and what would be the case for using one that only catches half of the runaway exceptions (throwables) but not the other half? -- Stas Malyshev smalyshev@gmail.com