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

@@ -43,7 +43,7 @@ public class BlockCommand 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 block to linked devices: " + e.getMessage());
throw new UnexpectedErrorException("Failed to sync block to linked devices: " + e.getMessage(), e);
}
}
@@ -55,7 +55,7 @@ public class BlockCommand implements JsonRpcLocalCommand {
} catch (GroupNotFoundException e) {
logger.warn("Group not found {}: {}", groupId.toBase64(), e.getMessage());
} catch (IOException e) {
throw new UnexpectedErrorException("Failed to sync block to linked devices: " + e.getMessage());
throw new UnexpectedErrorException("Failed to sync block to linked devices: " + e.getMessage(), e);
}
}
}