diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/008-exceptions/expected.txt | 2 | ||||
| -rw-r--r-- | test/008-exceptions/src/Main.java | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/008-exceptions/expected.txt b/test/008-exceptions/expected.txt index ea59a49677..083ecf7ced 100644 --- a/test/008-exceptions/expected.txt +++ b/test/008-exceptions/expected.txt @@ -9,7 +9,9 @@ Caused by: java.lang.NullPointerException: first throw ... 2 more Static Init BadError: This is bad by convention: BadInit +java.lang.NoClassDefFoundError: BadInit BadError: This is bad by convention: BadInit Static BadInitNoStringInit BadErrorNoStringInit: This is bad by convention +java.lang.NoClassDefFoundError: BadInitNoStringInit BadErrorNoStringInit: This is bad by convention diff --git a/test/008-exceptions/src/Main.java b/test/008-exceptions/src/Main.java index c0502047d0..9e3477a47b 100644 --- a/test/008-exceptions/src/Main.java +++ b/test/008-exceptions/src/Main.java @@ -98,8 +98,9 @@ public class Main { try { BadInit.dummy = 1; throw new IllegalStateException("Should not reach here."); - } catch (BadError e) { + } catch (NoClassDefFoundError e) { System.out.println(e); + System.out.println(e.getCause()); } } catch (Exception error) { error.printStackTrace(); @@ -120,8 +121,9 @@ public class Main { try { BadInitNoStringInit.dummy = 1; throw new IllegalStateException("Should not reach here."); - } catch (BadErrorNoStringInit e) { + } catch (NoClassDefFoundError e) { System.out.println(e); + System.out.println(e.getCause()); } } catch (Exception error) { error.printStackTrace(); |