mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Print exception name when failing to load state fiel
This commit is contained in:
parent
17d6b256e8
commit
86711b0e5c
1 changed files with 12 additions and 2 deletions
|
@ -181,7 +181,11 @@ public class App {
|
||||||
try {
|
try {
|
||||||
manager = RegistrationManager.init(username, dataPath, serviceEnvironment, BaseConfig.USER_AGENT);
|
manager = RegistrationManager.init(username, dataPath, serviceEnvironment, BaseConfig.USER_AGENT);
|
||||||
} catch (Throwable e) {
|
} 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) {
|
try (var m = manager) {
|
||||||
command.handleCommand(ns, m);
|
command.handleCommand(ns, m);
|
||||||
|
@ -234,7 +238,13 @@ public class App {
|
||||||
} catch (NotRegisteredException e) {
|
} catch (NotRegisteredException e) {
|
||||||
throw new UserErrorException("User " + username + " is not registered.");
|
throw new UserErrorException("User " + username + " is not registered.");
|
||||||
} catch (Throwable e) {
|
} 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 {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue