Re: [PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode

2020-05-30 Thread Dan Ackroyd
On Fri, 22 May 2020 at 17:09, Katie Volz 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 thro

Re: [PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode

2020-05-26 Thread Katie Volz
On Sun, May 24, 2020 at 7:29 PM Rowan Tommins wrote: > In my mind error_reporting should make absolutely no difference. As you > say, this option would be for people who don't want to interact with the > current error system in any way, and that includes its global > configuration state. > My m

Re: [PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode

2020-05-24 Thread Rowan Tommins
On 24/05/2020 22:07, Katie Volz wrote: I hadn't thought putting the error types in the declare(). My only issue with that is how that would interact with the error_reporting setting - for example if I set my error_reporting to E_WARNING and error_exceptions to E_ALL I'm not sure whether a notice

Re: [PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode

2020-05-24 Thread Katie Volz
On Fri, May 22, 2020 at 12:56 PM Rowan Tommins wrote: > Personally, I'm not a fan of promoting messages to exceptions in this > way, because APIs designed to throw exceptions generally look rather > different from ones designed to warn and continue, so blindly converting > seems like putting a sq

Re: [PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode

2020-05-22 Thread G. P. B.
On Fri, 22 May 2020 at 18:09, Katie Volz 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. > > Currently, the only way to handle notices/warnings in an exception-like > manner is via set

Re: [PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode

2020-05-22 Thread Rowan Tommins
On 22/05/2020 17:08, Katie Volz wrote: 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, Personally, I'm not a fan of promoting messages to exceptions in this way, because APIs designed to throw excepti

[PHP-DEV] [RFC][DISCUSSION] Error Exceptions mode

2020-05-22 Thread Katie Volz
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. Currently, the only way to handle notices/warnings in an exception-like manner is via set_error_handler, (for example, example #1 on https://www.php.ne