Skip to content

Latest commit

 

History

History
26 lines (23 loc) · 388 Bytes

File metadata and controls

26 lines (23 loc) · 388 Bytes

Discarding an exception after calling printStackTrace should usually be avoided.

try {
  // ...
} catch (IOException e) {
  logger.log(INFO, "something has gone terribly wrong", e);
}
try {
  // ...
} catch (IOException e) {
  throw new UncheckedIOException(e); // New in Java 8
}
try {
  // ...
} catch (IOException e) {
  e.printStackTrace();
}