[nycphp-talk] If/else vs Try/catch
David Krings
ramons at gmx.net
Wed Nov 28 19:45:58 EST 2007
csnyder wrote:
> Error handling doesn't need to be part of your program logic anymore.
I agree, it must be an integral part of the entire design and not just some
logic. I suffer every day from crappy error messages, especially from .NET
applications. But also browser based apps come along with error messages such
as "Error!", "Something went wrong!" or "Try again!". Not even a "please" in
there or at least some basic information as to what went wrong. Error handling
has to produce the following information:
- an error description
- information where the error ocurred
- information what was expected
- information what was provided
- information on what to do to overcome the error
- and if it helps an ID to reference the error
Just puking up some interpreter message just doesn't do it. And before any
confusion comes up, I know that doing this type of error handling is utterly
annoying and I don't adhere to my mandates either. Error handling doesn't add
any functionality to the application, error handlings is neither the meat or
the gravy, it is more the napkin and what does that come in handy when
something got spilled.
David
More information about the talk
mailing list