Re: type hinting throwing a fatal error
| From: | Zeev Suraski | Date: | Mon, 22 Aug 2005 19:50:27 +0000 |
| Subject: | Re: type hinting throwing a fatal error | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-18271@lists.php.net to get a copy of this message | ||
At 20:53 22/08/2005, Marcus Boerger wrote:
So in that case, the implementation in zend_error_cb() should simply call the user error handler if it's available, or treat it as if it's E_ERROR if there is no user error handler. Isn't an E_ERROR by default good enough or do you want exceptions here always?I'm not sure what happened, but I don't want exceptions at all, let alone always :)
In the former case it might be better to have a new error level E_HINT. In the latter case maybe it might be a good idea to move the default exceptions from ext/spl to the engine and have a 'Hint' whatever exception class derived from RunTimeException.One of us is missing something, or we're not talking about the same thing at all. I'm talking about allowing type hints to be trappable by users, without complicating them with exceptions. I'm proposing a new error level, which behaves like E_ERROR, except it can be caught using a userland error handler, for those cases where the engine/PHP are in a stable state. Zeev