From: Marc Steinert

> Basically try-catch gives you the ability to handle errors
> outside a class or method scope, by the 
> calling instance.
> This comes in handy, if you are programming in an object
> orientated way and thus enables you to 
> seperate error handling from the rest of your functionality.
> Means, your methods do only the things, they are meant to do,
> without bothering to handling occuring 
> errors.
> Hope, that made things clearer.

You know, this is the first explanation of exceptions I have seen that
actually makes sense. I could never figure out what they were and why
they were. It always looked like it was just a special subset of errors,
a distinction without a difference, as it were. But looking at them as a
technique to move the handlers out of the mainline code actually shines
some real light on the subject.

Thank you,

Bob McConnell

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to