]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/ReceiveCommand.java
Refactor dbus client mode to improve maintainability
[signal-cli] / src / main / java / org / asamk / signal / commands / ReceiveCommand.java
index f248d6628d9a34fa6cf988e840862a04dcb2bcbd..62b3164bfbf7968fee5c07cf2fee0b13a48fab1c 100644 (file)
@@ -126,7 +126,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
             }
         } catch (DBusException e) {
             logger.error("Dbus client failed", e);
-            throw new UnexpectedErrorException("Dbus client failed");
+            throw new UnexpectedErrorException("Dbus client failed", e);
         }
         while (true) {
             try {
@@ -157,7 +157,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
                     ignoreAttachments,
                     handler);
         } catch (IOException e) {
-            throw new IOErrorException("Error while receiving messages: " + e.getMessage());
+            throw new IOErrorException("Error while receiving messages: " + e.getMessage(), e);
         }
     }
 }