Files
openide/java/java-tests/testData/codeInsight/generation/surroundWith/java13/CaseThrowWithTryCatch_after.java
T
Anna Kozlovaandintellij-monorepo-bot 724ed16f6f [java] replace default catch block template (IDEA-161593)
`throw e` won't fix the compilation error, comment - is not really better than empty catch block.

GitOrigin-RevId: ea002c332900b032392e766f3dd13fe3258ad49c
2022-01-14 20:39:23 +00:00

15 lines
385 B
Java

class C {
void test(int n) {
String s = switch (n) {
case 1 -> /*0*/{
try {
/*1*/
throw new /*2*/RuntimeException("a")/*3*/;/*4*/
} catch (RuntimeException e) {
throw new RuntimeException(e);
}
}
default -> "";
};
}
}