X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/af292d8f0ea897ea13470489d51c40acca50fc3e..6f5e72119e0c996f1efefecda11e33422d44a171:/src/main/java/org/asamk/signal/commands/ReceiveCommand.java diff --git a/src/main/java/org/asamk/signal/commands/ReceiveCommand.java b/src/main/java/org/asamk/signal/commands/ReceiveCommand.java index 82bd5d8f..4686f26d 100644 --- a/src/main/java/org/asamk/signal/commands/ReceiveCommand.java +++ b/src/main/java/org/asamk/signal/commands/ReceiveCommand.java @@ -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 { @@ -147,7 +147,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand { returnOnTimeout = false; timeout = 3600; } - boolean ignoreAttachments = ns.getBoolean("ignore-attachments"); + boolean ignoreAttachments = Boolean.TRUE.equals(ns.getBoolean("ignore-attachments")); try { final var handler = outputWriter instanceof JsonWriter ? new JsonReceiveMessageHandler(m, (JsonWriter) outputWriter) : new ReceiveMessageHandler(m, (PlainTextWriter) outputWriter); @@ -157,8 +157,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand { ignoreAttachments, handler); } catch (IOException e) { - throw new IOErrorException("Error while receiving messages: " + e.getMessage()); - } catch (InterruptedException ignored) { + throw new IOErrorException("Error while receiving messages: " + e.getMessage(), e); } } }