Last active
December 13, 2015 18:58
-
-
Save jponge/4958975 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import java.io.IOException; | |
public class Except { | |
static void a() throws Exception { | |
try { | |
b(); | |
} catch (IOException e) { | |
throw new Exception("woops", e); | |
} finally { | |
System.out.println("finally a"); | |
} | |
} | |
static void b() throws IOException { | |
try { | |
throw new IOException("plop"); | |
} finally { | |
System.out.println("finally b"); | |
} | |
} | |
public static void main(String[] args) throws Exception { | |
a(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment