Created
September 1, 2016 17:43
-
-
Save jburwell/03545eff61f957820a50297d89670017 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class ExceptionHandling { | |
private static void throwExceptionInFinallyBlock() { | |
try { | |
System.out.println("Doing the do ..."); | |
} catch (Exception e) { | |
System.out.println("Caught exception " + e); | |
} finally { | |
System.out.println("In the finally block"); | |
throw new IllegalStateException("Failing in the finally block ..."); | |
} | |
System.out.println("Doing work after the try block"); | |
} | |
public static void main(String... theArguments) { | |
throwExceptionInFinallyBlock(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment