At 09:42 AM 3/27/2003 -0800, Shane Caraveo wrote:
Well, if set_error_handler could catch E_ERROR errors (and not bail), then errors could be changed to exceptions in user space. I already use this in the soap library to catch invalid parameters, which I beleive are only warnings. Not being able to catch exceptions on type hints will make them pretty useless to me.
Now that is a very strong statement. I consider type hints useful syntactic sugar but I don't think that it's useless if it doesn't throw an exception.
Andi
Strong to make the point, and not only useless to me, but to anyone using OO with SOAP. It prevents a proper SOAPFault from being returned by the server. There is no reason for this to be E_ERROR, we're not a compiled language. And I'm not arguing for hints to thow exceptions, just for them to be 'catchable' via the regular error handlers, rather than bailing PHP.
> If soap is a special case because of its nature, then don't use type > hints and check their type and throw an exception in user-land.
Doing stuff in userland is fine, but type hints would simplify code and remove the need to do that in user land. Of course, so would operator overloading.
Shane
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php