]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/SetPinCommand.java
Print stack trace of exception causes in verbose mode
[signal-cli] / src / main / java / org / asamk / signal / commands / SetPinCommand.java
index 3636a8b1e97ec64f6afdc1240183d3d0ded876b9..ec4a0e3b13f07a9f875b7ffa1347639928c9b362 100644 (file)
@@ -35,9 +35,10 @@ public class SetPinCommand implements JsonRpcLocalCommand {
             var registrationLockPin = ns.getString("pin");
             m.setRegistrationLockPin(Optional.of(registrationLockPin));
         } catch (UnauthenticatedResponseException e) {
             var registrationLockPin = ns.getString("pin");
             m.setRegistrationLockPin(Optional.of(registrationLockPin));
         } catch (UnauthenticatedResponseException e) {
-            throw new UnexpectedErrorException("Set pin error failed with unauthenticated response: " + e.getMessage());
+            throw new UnexpectedErrorException("Set pin error failed with unauthenticated response: " + e.getMessage(),
+                    e);
         } catch (IOException e) {
         } catch (IOException e) {
-            throw new IOErrorException("Set pin error: " + e.getMessage());
+            throw new IOErrorException("Set pin error: " + e.getMessage(), e);
         }
     }
 }
         }
     }
 }