]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/VerifyCommand.java
Print stack trace of exception causes in verbose mode
[signal-cli] / src / main / java / org / asamk / signal / commands / VerifyCommand.java
index b580be2abb19c7bf2becf17f7187aa975af79dd4..b7fffcd23ca5c663c2abb2247c2652121483ad78 100644 (file)
@@ -16,6 +16,11 @@ import java.io.IOException;
 
 public class VerifyCommand implements RegistrationCommand {
 
 
 public class VerifyCommand implements RegistrationCommand {
 
+    @Override
+    public String getName() {
+        return "verify";
+    }
+
     @Override
     public void attachToSubparser(final Subparser subparser) {
         subparser.help("Verify the number using the code received via SMS or voice.");
     @Override
     public void attachToSubparser(final Subparser subparser) {
         subparser.help("Verify the number using the code received via SMS or voice.");
@@ -39,9 +44,9 @@ public class VerifyCommand implements RegistrationCommand {
         } catch (KeyBackupServicePinException e) {
             throw new UserErrorException("Verification failed! Invalid pin, tries remaining: " + e.getTriesRemaining());
         } catch (KeyBackupSystemNoDataException e) {
         } catch (KeyBackupServicePinException e) {
             throw new UserErrorException("Verification failed! Invalid pin, tries remaining: " + e.getTriesRemaining());
         } catch (KeyBackupSystemNoDataException e) {
-            throw new UnexpectedErrorException("Verification failed! No KBS data.");
+            throw new UnexpectedErrorException("Verification failed! No KBS data.", e);
         } catch (IOException e) {
         } catch (IOException e) {
-            throw new IOErrorException("Verify error: " + e.getMessage());
+            throw new IOErrorException("Verify error: " + e.getMessage(), e);
         }
     }
 }
         }
     }
 }