Zeev Suraski wrote:
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 :)
Sorry to jump into the middle. I've read the thread but I don't
understand why for the average user it should make a difference whether
it's a real fatal error or just an uncaught exception.
My point is that both way of errors will have the same goal for the
average user: execution of script is stopped and the reason is shown to
the user. Actually an exception has more information attached to it
which I personally consider a plus.
Let alone the point that type hinting is something average users are not
likely to use anyway. And when they get in touch with it through a third
party PHP library, even than an exception would be more useful because
it displays the code flow of the library the user has no relation to;
another plus to me.
Now these points are not specific to the type hinting discussion here
actually. Any kind of error which may be fatal to the user but does not
leave the engine in an unpredictable state may be an exception. It is
the same functionality plus has more useful information attached to it.
I hope with these sentences I don't start another "convert all errors to
exceptions thread", this is clearly beyond what I'm trying to say.
An the other hand, people who want to use these feature have the option
to use it.
In the end it's not loss of functionality in any way. Both parties
(average users and not-so-average users) would benefit.
thanks for listening,
- Markus
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php