]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/AddDeviceCommand.java
Print stack trace of exception causes in verbose mode
[signal-cli] / src / main / java / org / asamk / signal / commands / AddDeviceCommand.java
index 1616a01ff1f01a828d492409c33a1d1a290a2722..e609ec1e074b73935f7c5b168c2e6d2565aeb9ae 100644 (file)
@@ -42,12 +42,12 @@ public class AddDeviceCommand implements JsonRpcLocalCommand {
             m.addDeviceLink(new URI(ns.getString("uri")));
         } catch (IOException e) {
             logger.error("Add device link failed", e);
-            throw new IOErrorException("Add device link failed");
+            throw new IOErrorException("Add device link failed", e);
         } catch (URISyntaxException e) {
             throw new UserErrorException("Device link uri has invalid format: " + e.getMessage());
         } catch (InvalidKeyException e) {
             logger.error("Add device link failed", e);
-            throw new UnexpectedErrorException("Add device link failed.");
+            throw new UnexpectedErrorException("Add device link failed.", e);
         }
     }
 }