Last active
August 29, 2015 14:03
-
-
Save yuki-takeichi/e21fb26258f8ccc21d11 to your computer and use it in GitHub Desktop.
Exception compile error (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
package exn; | |
import exn.SubClassException; | |
public class Main { | |
public Main() {} | |
public static void main(String args[]) { | |
Main main = new Main(); | |
try { | |
main.doProcessThatMayFail(); // Compile error! | |
} catch(SubClassException e) { | |
System.out.println("subclass exception!"); | |
} | |
} | |
public void doProcessThatMayFail() throws Exception { | |
throw new Exception(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment