precise rethrow with multiple exceptions in the try block (IDEA-169273)

This commit is contained in:
Anna.Kozlova
2017-03-07 17:16:53 +01:00
parent dd2da88977
commit 71cc26e25c
3 changed files with 25 additions and 8 deletions
@@ -0,0 +1,20 @@
class A1 extends Exception {}
class A2 extends Exception {}
class BA1 extends A1 {}
class ErrorTest {
public void testNok(boolean mode) throws BA1, A2 {
try {
if (mode) {
throw new BA1();
} else {
throw new A2();
}
} catch (A1 ex) {
throw ex;
}
}
}