AddExceptionToExistingCatchFix: hide fix in catch or finally IDEA-189654

This commit is contained in:
Roman.Ivanov
2018-04-06 12:26:55 +07:00
parent 9fe8f989f5
commit b973d42f1c
3 changed files with 54 additions and 0 deletions
@@ -0,0 +1,13 @@
// "Add exception to existing catch clause" "false"
import java.io.File;
class MyException extends Exception {}
class Test {
public static void main(String[] args) {
try {
} catch (RuntimeException e) {
throw new MyException<caret>();
}
}
}
@@ -0,0 +1,15 @@
// "Add exception to existing catch clause" "false"
import java.io.File;
class MyException extends Exception {}
class Test {
public static void main(String[] args) {
try {
} catch (RuntimeException e) {
} finally // comment
{
throw new MyException<caret>();
}
}
}