blob: cf6b5180e1288d1a811a518d759d2e54e33cf9f8 [file] [log] [blame] [view] [edit]
Discarding an exception after calling `printStackTrace` should usually be
avoided.
```java
try {
// ...
} catch (IOException e) {
logger.log(INFO, "something has gone terribly wrong", e);
}
```
```java
try {
// ...
} catch (IOException e) {
throw new UncheckedIOException(e); // New in Java 8
}
```
```java
try {
// ...
} catch (IOException e) {
e.printStackTrace();
}
```