You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

InitializerWithThrow.java 480B

12345678910111213141516171819202122
  1. import org.aspectj.testing.Tester;
  2. public class InitializerWithThrow {
  3. public static void main(String[] args) {
  4. try {
  5. new InitializerWithThrow();
  6. Tester.check(false, "no exception");
  7. } catch (TestException te) {
  8. }
  9. }
  10. static class TestException extends Exception {}
  11. int i = ini();
  12. static int ini() throws TestException {
  13. throw new TestException();
  14. }
  15. InitializerWithThrow() throws TestException {}
  16. }