On Tue, Oct 7, 2014 at 11:51 AM, Christian Stoller <stol...@leonex.de> wrote:
> From: Dan Ackroyd [mailto:dan...@basereality.com] ,Sent: Tuesday, October > 07, 2014 10:55 AM > > > > 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. > > } > > > > cheers > > Dan > > Ack > > We could make EngineException to be parent of the base Exception class. > And, if it is technically possible, it must be forbidden to extend > EngineException directly in userland. > > This is just an idea. It would be a little bit strange if Exception is > not the base exception class ;) but it makes sense, because EngineException > is an exception of all other exceptions ^^ > > Christian > yes, this was also suggested before, but that will be also a BC break for those people already using the name of the new parent class ( https://github.com/search?l=php&q=EngineException&type=Code&utf8=%E2%9C%93 for example). which can be still an ok decision, I'm just stating/repeating the pro/cons as this was all discussed before. -- Ferenc Kovács @Tyr43l - http://tyrael.hu