mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
AddExceptionToExistingCatch: more concrete message, scroll and highlight
This commit is contained in:
+16
@@ -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) {}
|
||||
}
|
||||
}
|
||||
+16
@@ -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) {}
|
||||
}
|
||||
}
|
||||
+16
@@ -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) {}
|
||||
}
|
||||
}
|
||||
+16
@@ -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) {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user