image provider

Rethrow Exceptions


Here is an email I received in response to one of my essays.

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.


This page is posted
on the web at:

http://mindprod.com/feedback/unmain/rethrow.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\feedback\unmain\rethrow.html
logo
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

IP:[65.110.21.43]
Your face IP:[54.196.145.173]
You are visitor number