AddExceptionToExistingCatch: more concrete message, scroll and highlight

This commit is contained in:
Roman.Ivanov
2018-03-29 11:24:55 +07:00
parent 21ddec7d1f
commit b938da3020
8 changed files with 240 additions and 50 deletions
@@ -0,0 +1,16 @@
// "Add exception to existing catch clause" "true"
import java.io.IOException;
class A extends Exception {}
class B extends Exception {}
class C extends Exception {}
class Test {
static void foo() throws A, B {}
public static void main(String[] args) {
try {
foo();
} catch (C | A | B e) {}
}
}
@@ -0,0 +1,16 @@
// "Add exception to existing catch clause" "true"
import java.io.IOException;
class A extends Exception {}
class B extends Exception {}
class C extends A {}
class D extends A {}
class Test {
static void foo() throws A {}
public static void main(String[] args) {
try {
foo();
} catch (B | A e) {}
}
}
@@ -0,0 +1,16 @@
// "Add exception to existing catch clause" "true"
import java.io.IOException;
class A extends Exception {}
class B extends Exception {}
class C extends Exception {}
class Test {
static void foo() throws A, B {}
public static void main(String[] args) {
try {
foo<caret>();
} catch (C e) {}
}
}
@@ -0,0 +1,16 @@
// "Add exception to existing catch clause" "true"
import java.io.IOException;
class A extends Exception {}
class B extends Exception {}
class C extends A {}
class D extends A {}
class Test {
static void foo() throws A {}
public static void main(String[] args) {
try {
foo<caret>();
} catch (C | D | B e) {}
}
}