Re: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]
| From: | Andi Gutmans | Date: | Thu, 27 Mar 2003 18:00:51 +0000 |
| Subject: | Re: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR] | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-385@lists.php.net to get a copy of this message | ||
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. 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. Andi