Suppressed exceptions with catch and rethrow

Joe Darcy joe.darcy at oracle.com
Thu Dec 9 09:22:07 PST 2010


On 12/7/2010 9:46 AM, Jason Mehrens wrote:
> Hello coin-dev,
>
> As a best practice, can/should the suppressed exceptions be used when cleaning up resources in a catch and rethrow?  Using the FileChannelImpl changes at http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/c164d0d59465 as an example.  Should 'ignore' be added as a suppressed exception to 'e'?
>
> Thanks,
>
> Jason 		 	   		
>

Hello.

Yes, we're evaluating several uses of suppressed exceptions for 
situations like this.

Thanks for the suggestion,

-Joe



More information about the coin-dev mailing list