IDEA-103576 (correct processing of unhandled multi-catch exceptions)

This commit is contained in:
Roman Shevchenko
2013-03-24 11:24:52 +01:00
parent c64aba450e
commit 992d208806
3 changed files with 35 additions and 26 deletions
@@ -227,4 +227,19 @@ class C {
throw new RuntimeException(e);
}
}
void m14() {
try {
n14(42);
}
catch (E1 | E2 e) {
e.printStackTrace();
<error descr="Unhandled exceptions: C.E1, C.E2">throw e;</error>
}
}
private void n14(int i) throws E1, E2, RuntimeException {
if (i == 1) throw new E1();
if (i == 2) throw new E2();
}
}