P
Paul
I've been searching for some general, practical guidelines that
distinguish between when it's the responsibility of the architect to
throw errors, and when it's assumed that catching them is going to be
the responsibility of the app programmer. As somebody who is new to
wearing the "architect" hat I find it confusing to consider throwing
errors that are only going to bubble up to the app if I don't throw them
anyway. Unless there is some secretive black-box thing that I'm doing,
and can add some extra text to the message property then I don't see why
I should bother throwing the error at all.
I'm working with fairly simplistic apps too, and this may be why I'm not
seeing the bigger picture with the way the error handling goes between
libraries and apps.
Besides adding some text to the message (that could indicate a wide
variety of value-added data, I guess), what would be the advantage of
throwing at the class library level? Perhaps one advantage is fixing
problems and not throwing them at all? I have been thinking in terms of
fatal errors that cannot be fixed, something like a "file not found",
something that I consider an error whose handling is the responsibility
of the app progammer.
~Paul
distinguish between when it's the responsibility of the architect to
throw errors, and when it's assumed that catching them is going to be
the responsibility of the app programmer. As somebody who is new to
wearing the "architect" hat I find it confusing to consider throwing
errors that are only going to bubble up to the app if I don't throw them
anyway. Unless there is some secretive black-box thing that I'm doing,
and can add some extra text to the message property then I don't see why
I should bother throwing the error at all.
I'm working with fairly simplistic apps too, and this may be why I'm not
seeing the bigger picture with the way the error handling goes between
libraries and apps.
Besides adding some text to the message (that could indicate a wide
variety of value-added data, I guess), what would be the advantage of
throwing at the class library level? Perhaps one advantage is fixing
problems and not throwing them at all? I have been thinking in terms of
fatal errors that cannot be fixed, something like a "file not found",
something that I consider an error whose handling is the responsibility
of the app progammer.
~Paul