> I know PHP's model is all messed up, but no one here, I believe, is
> asking about putting non-error log messages in Exceptions. IO failure is
> an exception.
> 
> If your IO operation fails, you can't just log it and plow forward
> blissfully without handling the problem.
> 
> Stan
> 

Exceptions allow you to decide:
I know how to handle it -> deal with it,
I don't know how to handle it -> pop up to higher layer who might know
I didn't know this case needs to be handled -> pop up to handler of last
resort, either crash or catch-all and at least present some meaningful
info on what happened.

That's managable. Of course you can probably do most stuff with error
code handling, PEAR_Error & Friends, error handlers for really bad
stuff. We've been doing this before Exceptions. But wherever it makes
sense, I tend to use them.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to