mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-02-11 03:17:13 +07:00
Updated logging for cli errors relating to org.apache.commons.cli.ParseException
This commit is contained in:
parent
495dbefa9f
commit
d847297032
@ -30,7 +30,12 @@ public class Tool implements ApplicationListener {
|
||||
}
|
||||
|
||||
protected void handleCliError(String cmd, Options options, Throwable t) {
|
||||
log.error(t.getMessage(), t);
|
||||
if (t instanceof ParseException) {
|
||||
log.debug(t.getMessage(), t);
|
||||
} else {
|
||||
log.fatal(t.getMessage(), t);
|
||||
}
|
||||
|
||||
System.out.println(ExceptionUtils.getRootCauseMessage(t));
|
||||
printHelp(cmd, options);
|
||||
System.exit(0);
|
||||
|
Loading…
Reference in New Issue
Block a user