mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
20 lines
447 B
Java
20 lines
447 B
Java
import java.io.FileNotFoundException;
|
|
import java.io.IOException;
|
|
|
|
// "Add 'catch' clause(s)" "true-preview"
|
|
class CatchExceptions {
|
|
|
|
void foo() throws java.io.IOException, java.io.FileNotFoundException {
|
|
|
|
}
|
|
|
|
void bar() {
|
|
try {
|
|
foo();
|
|
} catch (FileNotFoundException e) {
|
|
<selection><caret>throw new RuntimeException(e);</selection>
|
|
} catch (IOException e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
} |