The Source for Java Technology Collaboration
User: Password:



Start New Message Post a Reply

Subject:  In my experience...
Date:  2007-06-24 00:43:47
From:  stuartcw


In my experience, Checked Exceptions were helpful when used intelligently. Some thought has to be put in to the design of the Exception classes to prevent a proliferation of Exception types that need to handled individually. Grouping them into families that could be broadly handled reduced the exception handling code greatly.

Code review greatly helped the situation. Just squashing an exception and not handling it all was considered an unusual case which warranted special documentation in the "do nothing" catch block to explain why this was a bug. Printing the stack trace was never acceptable.

Almost all of the hard to find bugs were due to a squashed exception that had slipped through the net.

Also, don't forget to exercise the Exception Handling code in your automated test cases.

 Feed java.net RSS Feeds