At 20:34 29/05/2010, Zeev Suraski wrote:
At 20:28 29/05/2010, Chris Stockton wrote:
My biggest issue as a user is the fatal errors. Why are we blowing
up on something that should throw some kind of useful argument
exception? I end up in my applications using instanceof everywhere
because their is important cleanup to be done before the end of the
request. For example I can't afford for php to just blow up in our
account setup script, we are reaching out to multiple
non-transactional external resources. Some of our long running
command line processes have the same issue. I am all for type
hinting but the fatal errors or "catchabale" fatal errors are just
silly. Exceptions make so much more sense to me.
IMHO we shouldn't be getting to any kind of fatal error/exception
situation, which is why I like the idea of auto-conversion plus
E_STRICT in the 'weird conversion' scenarios (the API function
shouldn't care - it got what it asked for; The caller would get
notified that he passed something that probably doesn't make sense).
But as to why errors and not exceptions - we have a guideline that
language constructs don't through exceptions. It's up to users
whether they want to use exceptions or not.
s/through/throw, oops :)
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php