Re: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR]
| From: | Shane Caraveo | Date: | Thu, 27 Mar 2003 17:42:59 +0000 |
| Subject: | Re: Re: [Zend Engine 2] Type hints revisited [IllegalArgumentException instead of E_ERROR] | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-378@lists.php.net to get a copy of this message | ||
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.
Shane
Andi Gutmans wrote:
At 05:16 PM 3/27/2003 +0100, Timm Friebe wrote:I've implemented an additional feature for type hints that will throw an exception instead of bailing out in case an incorrect type is passed.I don't see any major advantage in doing this. I think we should keep PHP error handling the same as in PHP 4 and leave exceptions in user-land. Otherwise we'll end up having an unmanageable hybrid because there's no way we're going to change the error-handling of the existing internal functions. The majority of our user base is still functional, please don't forget this. I feel that people here tend to forget that. Andi