Regards<br />J.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Regards<br />J.
Originally posted by Jaun Katabasis:
in my design each subsystem throwed just exceptions congruent with its level. as example
my (layered) database subsystem throwed
database exceptions at a medium level, while my client facade just throwed client exceptions in an upper level. for this purpose i extensively used translations & exception chaining.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
quoted by Mark Spritzler :
Say I get a DatabaseException which has a reference to a ServerException, which has a reference to a RemoteException, which has a reference to a InvalidNumberException. You class has the DatabaseException and way to travers all the way down to the InvalidNumberException and see what is inside it.
Regards<br />J.
the class that finally manages the exception will have to deal with different kind of exceptions, from different levels. a chaotic design imo.
while wrapping at each level is it possible to supply Diagnostic Information in the message ?
How does the application know that this is the level where the source of the problem lies in order to supply Diagnostic Information in the message?
Regards<br />J.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |