mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Print stack trace of exception causes in verbose mode
This commit is contained in:
parent
e3c37a0239
commit
2044a7d7a5
32 changed files with 66 additions and 60 deletions
|
@ -40,7 +40,8 @@ public class Main {
|
|||
installSecurityProviderWorkaround();
|
||||
|
||||
// Configuring the logger needs to happen before any logger is initialized
|
||||
configureLogging(isVerbose(args));
|
||||
final var isVerbose = isVerbose(args);
|
||||
configureLogging(isVerbose);
|
||||
|
||||
var parser = App.buildArgumentParser();
|
||||
|
||||
|
@ -51,6 +52,9 @@ public class Main {
|
|||
new App(ns).init();
|
||||
} catch (CommandException e) {
|
||||
System.err.println(e.getMessage());
|
||||
if (isVerbose && e.getCause() != null) {
|
||||
e.getCause().printStackTrace();
|
||||
}
|
||||
status = getStatusForError(e);
|
||||
}
|
||||
System.exit(status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue