Is there an elegant way to handle exceptions that are thrown in finally block?
finally
For example:
try { // Use the resource. } catch( Excep
If you're using Java 7, and resource implements AutoClosable, you can do this (using InputStream as an example):
resource
AutoClosable
try (InputStream resource = getInputStream()) { // Use the resource. } catch( Exception ex ) { // Problem with the resource. }