Re: [RFC] Throwable Interface
| From: | Marc Bennewitz | Date: | Sun, 24 May 2015 19:08:55 +0000 |
| Subject: | Re: [RFC] Throwable Interface | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86365@lists.php.net to get a copy of this message | ||
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 PiotrowskiMarc