On 19 August 2015 at 07:20, Björn Larsson <bjorn.x.lars...@telia.com> 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, otherwise >> 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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php