mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 16:36:56 +07:00
28 lines
508 B
Java
28 lines
508 B
Java
import java.util.Random;
|
|
|
|
class BrokenAlignment {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
Throwable error = null;
|
|
try {
|
|
doSomething();
|
|
} catch (AssertionError e) {
|
|
// rethrow error
|
|
throw e;
|
|
} catch (Throwable e) {
|
|
// remember error
|
|
error = e;
|
|
}
|
|
|
|
if (error != null) { // <<--- inspection warning
|
|
// handle error ...
|
|
}
|
|
|
|
}
|
|
|
|
public static void doSomething() {
|
|
if (new Random().nextInt() > 2) throw new RuntimeException("dummy");
|
|
}
|
|
|
|
} |