Print stack trace of exception causes in verbose mode

This commit is contained in:
AsamK 2021-09-08 20:38:24 +02:00
parent e3c37a0239
commit 2044a7d7a5
32 changed files with 66 additions and 60 deletions

View file

@ -42,7 +42,7 @@ public class UnblockCommand implements JsonRpcLocalCommand {
} catch (NotMasterDeviceException e) {
throw new UserErrorException("This command doesn't work on linked devices.");
} catch (IOException e) {
throw new UnexpectedErrorException("Failed to sync unblock to linked devices: " + e.getMessage());
throw new UnexpectedErrorException("Failed to sync unblock to linked devices: " + e.getMessage(), e);
}
}
@ -53,7 +53,7 @@ public class UnblockCommand implements JsonRpcLocalCommand {
} catch (GroupNotFoundException e) {
logger.warn("Unknown group id: {}", groupId);
} catch (IOException e) {
throw new UnexpectedErrorException("Failed to sync unblock to linked devices: " + e.getMessage());
throw new UnexpectedErrorException("Failed to sync unblock to linked devices: " + e.getMessage(), e);
}
}
}