Rethrow Exceptions  Rethrow Exceptions

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
logo
Please email your , letters to the editor, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email. If you want your message, your name or email kept confidential, not considered for public posting, please explicitly specify that. Unless you state otherwise, I will treat your message as a letter to the editor that I may or may not publish in the feedback section. After that, it will be too late to retract it. If you disagree with something I said, please quote it and cite the web page where you found it, tell me why you think it is wrong, and, if possible, provide some supporting evidence. Threatening to kill me or spouting obscenities has yet to persuade me to change my mind.
mindprod.com IP:[65.110.21.43]
viewYour face IP:[38.107.179.213]
You are visitor number 11.