On Fri, 3 Aug 2012, Ferenc Kovacs wrote:

> Basically Etienne mentioned that the original issue was a good example why
> would we reconsider throwing exceptions from the core, which is currently
> discouraged.[2]
> Stan replied with the idea of turning the current error handling mechanism
> in php into using Exceptions for everything, but keeping some error types
> as is/uncatchable. [3]

This is going to be the biggest BC break *ever*. Instead of harmless 
notices and warnings that people will and can (and sometimes should) 
ignore, the moment any of those happens, the script will suddendly 
because the exception isn't caught. 

> > Andrew:
> From your mails, it seems that you don't agree with Stan on turning
> everything but fatals into exceptions[9].

That's a funny one. The only thing that currently makes sense to use an 
exception for is the E_RECOVERABLE - that is, without potentionally 
breaking any script that's ever been written.

> So basically these are our boundaries:
> 
>    - Fatal errors can't be turned into Exceptions, but it was mentioned
>    multiple times, that there are some fatals, which could be turned into
>    E_RECOVERABLE_ERROR.

Some, but definitely not many. When we introduced E_RECOVERABLE we had a 
good look at them all.

>    - Most/all non-fatal errors could be safe to be turned into Exceptions
>    as without explicit measures(try-catch) on the caller's side, it would
>    still stop the execution.

And hence break the script...

cheers,
Derick

-- 
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to