Re: [RFC] Exceptions in the engine
| From: | Nikita Popov | Date: | Thu, 24 Oct 2013 19:40:28 +0000 |
| Subject: | Re: [RFC] Exceptions in the engine | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69853@lists.php.net to get a copy of this message | ||
On Thu, Oct 24, 2013 at 9:27 PM, Joe Watkins <krakjoe@php.net> wrote:
> I have to ask the question; why stop at half way ??
>
> A warning does absolutely nothing for the programmer, or their code, all
> it does is warn the client, who isn't very likely to even be in contact
> with the programmer, even less likely has access to their code.
>
> [...]
>
> This solution has existed for years, why do we shy away from it so much ??
> I've never heard a really good argument for the existence of warnings or
> notices at all.
>
> This is all said with the knowledge that some errors are truly fatal,
> there is no point to, or chance of, throwing an exception.
>
> +1 on the whole idea, however far we are able to take it ... the further
> the better in my opinion ...
>
Changing existing warnings to exceptions would be a (massive) compatibility
break. Changing fatal errors isn't (in first order approximation) because -
well, they are fatal, you can't really depend on their behavior unless you
are using them as a die-substitute or something ^^
As this RFC is aimed at the 5.x branch it needs to maintain BC to a
reasonable level, so changing warnings is really out of its scope. If you
want to change warnings to exceptions that should be a separate proposal
targeted at PHP 6. I'd prefer to keep it out of this thread.
Thanks,
Nikita