On Fri, 22 May 2020 at 17:09, Katie Volz <iggyv...@gmail.com> wrote: > > Hello internals, > > I want to start a discussion on an RFC to add a declare() statement to > convert all errors triggered within a file to exceptions. >
Hi Katie/Iggy, I'm not sure this is the right thing to do. Having internal code just throw generic ErrorExceptions does not get PHP to a place where it is possible for users to listen for individual error types, which I think is the biggest problem with the current situation. I won't duplicate my message from another thread, but I think there is an alternative path: https://news-web.php.net/php.internals/110315 > The error handler cannot be set in library code without affecting other > libraries We could also just make the default error handler convert all errors/warnings to exceptions.....I've been doing that for my error handlers for years, and I believe it's the right thing to do for 95%+ of applications. Though it does require some use of the silence operator, which apparently some people find disconcerting. cheers Dan Ack -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php