[java] Printing stack trace to console instead of trowing in finally block
It's a sample executable utility so printing to the console is acceptable.
Throwing from a finally block hides the original exception if there were one.
@@ -169,7 +169,7 @@ public static void main(String[] args) throws IOException {
.map(Path::toFile)
.forEach(File::delete);
} catch (IOException e) {
- throw new UncheckedIOException(e);
+ e.printStackTrace();
}
});
}
