]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/textsecure/AttachmentInvalidException.java
Fix exceptions to work over dbus
[signal-cli] / src / main / java / org / asamk / textsecure / AttachmentInvalidException.java
index bf2272695b04f7cbb67e7b12b71bc6d53bc5cbc2..5afa67e37356658e583f61e4e5f1c2a379a188dd 100644 (file)
@@ -1,14 +1,13 @@
 package org.asamk.textsecure;
 
-public class AttachmentInvalidException extends Exception {
-    private final String attachment;
+import org.freedesktop.dbus.exceptions.DBusExecutionException;
 
-    public AttachmentInvalidException(String attachment, Exception e) {
-        super(e);
-        this.attachment = attachment;
+public class AttachmentInvalidException extends DBusExecutionException {
+    public AttachmentInvalidException(String message) {
+        super(message);
     }
 
-    public String getAttachment() {
-        return attachment;
+    public AttachmentInvalidException(String attachment, Exception e) {
+        super(attachment + ": " + e.getMessage());
     }
 }