On Tue, Oct 7, 2014 at 10:55 AM, Dan Ackroyd <dan...@basereality.com> wrote:
> Stas wrote: > > > The only issue I think we need to discuss is catch(Exception $e). Now it > > would catch much more than before, if we do no changes. > > It's not clear why would that be an issue - can you specify what the > problem would be? > > Also, if we changed `catch(Exception $e)` to not catch all exceptions, > than we would need to have another way of specifying that a catch > block should catch all exceptions. Which would involve either making > \Exception extend another even 'baser' Exception, or a hack to the > syntax e.g. something like: > > catch($e) { > // Catch without Exception type catches all exceptions > // and confuses people. > } > we discussed this before on the mailing list, the problem would be that currently the fatal errors will stop the execution and even recoverable fatals for most people (when they don't have a global error handler defined to handle it) and theoretically it is possible that some code exists out there with Pokemon Exception Handling ( http://c2.com/cgi/wiki?PokemonExceptionHandling) where the code would continue the execution and probably does some logically faulty operation which previously was only prevented by the fatal error stopping the code. this indeed assumes that the user already follow bad coding practices(Catch them all) and code with (potential) fatal errors so there were a disagreement if we could afford this BC or not. Personally I think that it would be fine for a major version. > > -- Ferenc Kovács @Tyr43l - http://tyrael.hu