From: AsamK Date: Sat, 27 Feb 2021 16:43:19 +0000 (+0100) Subject: Print exception name when failing to load state fiel X-Git-Tag: v0.8.1~6 X-Git-Url: https://git.nmode.ca/signal-cli/commitdiff_plain/86711b0e5c37c7d202151c7d05b00e5bdeb7836b?hp=17d6b256e86223f356d6d73916bc0798c9c52214 Print exception name when failing to load state fiel --- diff --git a/src/main/java/org/asamk/signal/App.java b/src/main/java/org/asamk/signal/App.java index 5b2c91c6..75ac5280 100644 --- a/src/main/java/org/asamk/signal/App.java +++ b/src/main/java/org/asamk/signal/App.java @@ -181,7 +181,11 @@ public class App { try { manager = RegistrationManager.init(username, dataPath, serviceEnvironment, BaseConfig.USER_AGENT); } catch (Throwable e) { - throw new UnexpectedErrorException("Error loading or creating state file: " + e.getMessage()); + throw new UnexpectedErrorException("Error loading or creating state file: " + + e.getMessage() + + " (" + + e.getClass().getSimpleName() + + ")"); } try (var m = manager) { command.handleCommand(ns, m); @@ -234,7 +238,13 @@ public class App { } catch (NotRegisteredException e) { throw new UserErrorException("User " + username + " is not registered."); } catch (Throwable e) { - throw new UnexpectedErrorException("Error loading state file for user " + username + ": " + e.getMessage()); + throw new UnexpectedErrorException("Error loading state file for user " + + username + + ": " + + e.getMessage() + + " (" + + e.getClass().getSimpleName() + + ")"); } try {