Reduce use of printStackTrace

This commit is contained in:
AsamK 2023-11-07 09:28:29 +01:00
parent 4e8f0a41c7
commit e61f587bfc
4 changed files with 19 additions and 15 deletions

View file

@ -62,11 +62,11 @@ public class Main {
} catch (CommandException e) {
System.err.println(e.getMessage());
if (verboseLevel > 0 && e.getCause() != null) {
e.getCause().printStackTrace();
e.getCause().printStackTrace(System.err);
}
status = getStatusForError(e);
} catch (Throwable e) {
e.printStackTrace();
e.printStackTrace(System.err);
status = 2;
}
System.exit(status);