On 05/23/2015 10:12 PM, Aaron Piotrowski wrote:
Hello, I’ve created an RFC for modifying the exception hierarchy for
PHP 7, adding Throwable interface and renaming the exceptions thrown
from fatal errors. The RFC is now ready for discussion. RFC:
https://wiki.php.net/rfc/throwable-interface
<https://wiki.php.net/rfc/throwable-interface> Pull Request:
https://github.com/php/php-src/pull/1284
<https://github.com/php/php-src/pull/1284>
I like this RFC! It's much more intuitive as the current BaseException
approve.
Some small notes:
Backwards Compatibility
|Throwable|, |Error|, |TypeError|, and |ParseError| will no longer be
available in the global namespace.
Where are the new classes and the interface located if it's not in the
global namespace or do I muss something?
If I remember right the TypeException/TypeError will be thrown in some
cases of internal functions with strict argument count.
In my opinion a missing argument or to much arguments has nothing to do
with the type and should have it's own Exception/Error class.
Aaron Piotrowski
Marc
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php