Hi,

Le Sat, 14 Feb 2015 00:25:12 +0100, Nikita Popov <nikita....@gmail.com> a écrit:

The question of whether EngineException should inherit from Exception is
something we do have to consider now. Personally I prefer not introducing
any special exception types that aren't caught by default. I think that
would only make sense for errors that could occur literally everywhere
(like memory limit or timeout), but these are not handled by this RFC for
technical reasons. If someone has a strong opinion on this, I might make it
a voting option.

Commentary on these, and also any other relevant points is very welcome!

Thanks,
Nikita


I don't think EngineException should inherit from Exception, it would be very dangerous. I'm sure a lot of exceptions are handled like this by a lot of devs, without creating custom exceptions :

try {

} catch ( Exception $e ) {

}

Making EngineException inherit from Exception means that there is a chance it will change the behavior of this kind of code, maybe breaking some crucial datas in database or such.

Instead, I think Exception should inherit from EngineException. Or anything else.

Regards,
Benoit.

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

Reply via email to