Created
October 25, 2012 08:12
-
-
Save yurylyt/3951355 to your computer and use it in GitHub Desktop.
where-do-stack-traces-come-1
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 class Main { | |
public static void main(String[] args) throws IOException { | |
try { | |
foo(); | |
} catch (RuntimeException e) { | |
bar(e); | |
} | |
} | |
private static void foo() { | |
throw new RuntimeException("Foo!"); | |
} | |
private static void bar(RuntimeException e) { | |
throw e; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment