[RFC DISCUSSION] Error Storage Behavior
| From: | Fleshgrinder | Date: | Sat, 11 Jun 2016 15:48:49 +0000 |
| Subject: | [RFC DISCUSSION] Error Storage Behavior | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-93903@lists.php.net to get a copy of this message | ||
Currently error_get_last() always contains the last error that occurred,
however, this is actually not desired if the last error was an exception
that was caught.
https://github.com/php/php-src/pull/1936
With the above change only uncaught exceptions are retrievable via
error_get_last(). This is consistent with the behavior of custom error
handlers that successfully handle the error; they are not retrievable
via error_get_last(0.
Note that this change is a breaking change since users might rely on
exactly this behavior. However, it is undocumented and there is a bug
report for it too:
https://bugs.php.net/bug.php?id=54043
--
Richard "Fleshgrinder" Fussenegger
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc