]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/SendCommand.java
Print stack trace of exception causes in verbose mode
[signal-cli] / src / main / java / org / asamk / signal / commands / SendCommand.java
index 7ab445fc378bb914843095ae94f0d106a5b138f2..1973b1a106ca31a40de20574ec41b7b5c1444b17 100644 (file)
@@ -86,7 +86,7 @@ public class SendCommand implements DbusCommand, JsonRpcLocalCommand {
                 return;
             } catch (IOException e) {
                 throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
-                        .getSimpleName() + ")");
+                        .getSimpleName() + ")", e);
             }
         }
 
@@ -110,7 +110,7 @@ public class SendCommand implements DbusCommand, JsonRpcLocalCommand {
             ErrorUtils.handleSendMessageResults(results.getResults());
         } catch (AttachmentInvalidException | IOException e) {
             throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
-                    .getSimpleName() + ")");
+                    .getSimpleName() + ")", e);
         } catch (GroupNotFoundException | NotAGroupMemberException | GroupSendingNotAllowedException e) {
             throw new UserErrorException(e.getMessage());
         }
@@ -147,7 +147,7 @@ public class SendCommand implements DbusCommand, JsonRpcLocalCommand {
                         .getSimpleName() + ")");
             } catch (DBusExecutionException e) {
                 throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
-                        .getSimpleName() + ")");
+                        .getSimpleName() + ")", e);
             }
         }
 
@@ -176,7 +176,7 @@ public class SendCommand implements DbusCommand, JsonRpcLocalCommand {
                 outputResult(outputWriter, timestamp);
                 return;
             } catch (DBusExecutionException e) {
-                throw new UnexpectedErrorException("Failed to send group message: " + e.getMessage());
+                throw new UnexpectedErrorException("Failed to send group message: " + e.getMessage(), e);
             }
         }
 
@@ -189,7 +189,7 @@ public class SendCommand implements DbusCommand, JsonRpcLocalCommand {
                 throw new UntrustedKeyErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
                         .getSimpleName() + ")");
             } catch (DBusExecutionException e) {
-                throw new UnexpectedErrorException("Failed to send note to self message: " + e.getMessage());
+                throw new UnexpectedErrorException("Failed to send note to self message: " + e.getMessage(), e);
             }
         }
 
@@ -203,7 +203,7 @@ public class SendCommand implements DbusCommand, JsonRpcLocalCommand {
                     .getSimpleName() + ")");
         } catch (DBusExecutionException e) {
             throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass()
-                    .getSimpleName() + ")");
+                    .getSimpleName() + ")", e);
         }
     }