Rethrow Exceptions  Rethrow Exceptions

home page feedback about the unmaintainable code essay Google search web for more information on this topic jump to foot of page translate this page with Babelfish ©2000-2010 Roedy Green, Canadian Mind Products

Here is an email I received in response to my essay on how to write unmaintainable code.

Rethrow Exceptions : Chris Dailey : cdailey@iknowledgeinc.com : 2000-09-26

I have a suggestion for the unmaintainable code page. Here’s something I get bit by all the time:
// rethrowing an Exception
try {
  :
  :
} catch ( IOException ioe ) {
 throw new SubsystemException( ioe.getMessage() );
}
This effectively loses the stack trace of the original cause of the error, and is especially effective if there are lots o’ stuff (including many method calls to things that could cause the Exception that will be hidden) in the try block.

By the way, I like the new design for the web site! Looks like you put a lot of work into it!

Thanks a lot for the web site, it’s quite useful. (Even the non-technical stuff! :> ) I hope you're doing well.

I have been gradually working on improving the look of the site and making in more navigable. I look for the ugliest icon or layout and fix that up. I figure over time it will eventually look pretty spiffy.


CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/feedback/unmain/rethrow.html J:\mindprod\feedback\unmain\rethrow.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
viewYour face IP:[38.107.191.113]
You are visitor number 11.