mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
precise rethrow with multiple exceptions in the try block (IDEA-169273)
This commit is contained in:
+20
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user