On 05/24/2015 10:11 PM, Aaron Piotrowski wrote:

On May 24, 2015, at 2:08 PM, Marc Bennewitz <dev@mabe.berlin> wrote:

Where are the new classes and the interface located if it's not in the global 
namespace or do I muss something?
Sorry if what I wrote wasn’t clear. Throwable, Error, TypeError, and ParseError 
will be built-in interfaces/classes in the root namespaces. So users will not 
be able to make classes with those exact names, but classes with those names in 
a non-global namespace (e.g., \Vendor\Package\TypeError) will still be 
possible. I’ve updated the RFC to make this clearer.
Thanks

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.
I believe this actually generates a warning, it does not throw an exception. 
However, this does remind me of another point: It is possible that more classes 
extending Error could be created in the future for different error reasons. 
Anything that throws an Error could later be changed to throw an object 
extending Error without a BC break. This is a separate issue though and could 
be discussed in a future RFC.
Ok than I remember wrong.

Aaron Piotrowski

Marc

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

Reply via email to