Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94607 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38726 invoked from network); 21 Jul 2016 07:08:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2016 07:08:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@fleshgrinder.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@fleshgrinder.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fleshgrinder.com from 77.244.243.87 cause and error) X-PHP-List-Original-Sender: php@fleshgrinder.com X-Host-Fingerprint: 77.244.243.87 mx106.easyname.com Received: from [77.244.243.87] ([77.244.243.87:60687] helo=mx201.easyname.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/DA-52781-4F470975 for ; Thu, 21 Jul 2016 03:08:37 -0400 Received: from cable-81-173-132-156.netcologne.de ([81.173.132.156] helo=[192.168.178.20]) by mx.easyname.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1bQ85x-00028u-HL; Thu, 21 Jul 2016 07:08:33 +0000 Reply-To: internals@lists.php.net References: <2c547cd2-408d-238b-2b5c-e6f7f24f0e7a@fleshgrinder.com> To: Nikita Popov , Stanislav Malyshev Cc: PHP internals Message-ID: <26ecef3e-6a4e-28bf-f697-ea9559516ba3@fleshgrinder.com> Date: Thu, 21 Jul 2016 09:08:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="T8XlK8GjXsvXn1MgRDeuukgT8Pr0vkrW6" Subject: Re: [PHP-DEV] [RFC DISCUSSION] Error Storage Behavior From: php@fleshgrinder.com (Fleshgrinder) --T8XlK8GjXsvXn1MgRDeuukgT8Pr0vkrW6 Content-Type: multipart/mixed; boundary="lPwXDBaE5HxUhxwRlWbhoSU1DlPm7osnk" From: Fleshgrinder Reply-To: internals@lists.php.net To: Nikita Popov , Stanislav Malyshev Cc: PHP internals Message-ID: <26ecef3e-6a4e-28bf-f697-ea9559516ba3@fleshgrinder.com> Subject: Re: [PHP-DEV] [RFC DISCUSSION] Error Storage Behavior References: <2c547cd2-408d-238b-2b5c-e6f7f24f0e7a@fleshgrinder.com> In-Reply-To: --lPwXDBaE5HxUhxwRlWbhoSU1DlPm7osnk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 7/13/2016 10:29 PM, Nikita Popov wrote: > I think there is some confusion about this change because the descripti= on > was unclear. >=20 > The change is **only** about EH_THROW handling. EH_THROW is used by > extensions to replace warnings etc with exceptions. Currently the excep= tion > is thrown, but error_get_last() still behaves as if the warning was thr= own > instead. Fixing this does seem like a normal bug fix to me. Note that t= his > does not touch exceptions thrown from error handlers or similar in any = way. >=20 > Basically the problem is that an extension using zend_throw_exception > directly and an exception throwing through EH_THROW will behave > differently, while there should be no difference. >=20 > The part about behavior being dependent on whether you catch the except= ion > or not: This is true only insofar as an uncaught exception generates a > fatal error and that fatal error is retrievable through error_get_last(= ). > There is no special casing occurring here. >=20 > Nikita >=20 The thing that bugs me is the fact that I could not find a single situation in which error_get_last() contains a warning although an exception was thrown other than in the DateTime example from the original bug report. I do not want to simply report this as a bug fix without fully understanding its implications. In other words: why does error_get_last() sometimes contain a warning and sometimes doesn't?!? This is why I opened this thread, to get some insights from you guys since you know internals much better. --=20 Richard "Fleshgrinder" Fussenegger --lPwXDBaE5HxUhxwRlWbhoSU1DlPm7osnk-- --T8XlK8GjXsvXn1MgRDeuukgT8Pr0vkrW6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXkHTuAAoJEOKkKcqFPVVrXLcP/2ZMbeJkoitNBY9RZr5GaFy1 /idtHsOEQloFNwbWG1hCoyiL0XXX6vF7SPhQ7Rg/LsZ/4noRxuNTug76s4eRem08 YDf9SAAlAbURSUiqb6P6XB+iy+bJKL4IL3dpZjWEx8I1msaudeLRvAjJJtAF76VV 222e0cSts/ATAkX7J2IJowP9wOxoziwVln4jmyY27d76yB3rDAF34IQo7n35w77O mARrpPguc7L5PvBRYd43t3SA9X8Fi6tYtd0o9IaJHaLGHvEeUeSYrEg5wYMk3Sk3 CF8tsMRMZt8daFyDwwt/f9H4dXh31bFXEwidm/8gSW7Lv5+YP1X/VTNy73YB6qGM 0Tnm1Ut6GgSpQ5P2vIU5lqVtMYnDzEGpmJ56o0bYuCXtFGZJLi20+TJEEPxYg0qf PNGkqPu4Dza5JCKRAz1TRp1EHCQQ/zD6+O1Mx3utLuTQvxqo2RhoeUsdv3U2D3b0 BObDG2TiOIjhQtBbW5lLTM1B2l2kJ3lGU3ZZb45/a3LwVipxnZ5kqNbzbe++04KO 5fEzasHQZJs2vu/BixkmtMXU93ImEKvZbRlNZCIjD2yRht+5953k7Ske8p0FJWkI m8W7GWFU6/nMbYrzZ6O+jH8FZAEffvv8GZl3Nbf7/YIlVlQTkhf780m9aYNqLt3S Kmhn9u6bk/En67ZE79Jr =nh7W -----END PGP SIGNATURE----- --T8XlK8GjXsvXn1MgRDeuukgT8Pr0vkrW6--