Skip to content

Commit

Permalink
log stacktrace of NPEs by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Mar 29, 2024
1 parent 9cf75e7 commit 0b16d1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/vegardit/copycat/CopyCatMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public String headerHeading(final Object @Nullable... params) {
});
handler.setExecutionExceptionHandler((ex, commandLine, parseResult) -> {
ex = asNonNullUnsafe(ex);
if (LOG.isDebugEnabled()) {
if (LOG.isDebugEnabled() || ex instanceof UnsupportedOperationException || ex instanceof NullPointerException) {
LOG.error(ex); // log with stacktrace
} else {
LOG.error(ex.getMessage());
Expand Down

0 comments on commit 0b16d1b

Please sign in to comment.