]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/Main.java
Remove now unnecessary try/catch
[signal-cli] / src / main / java / org / asamk / signal / Main.java
index 00d9d7a9fbe2944becb05037d7922b81d96a2494..1e05206d81b290930a929badbe13bd4efdf2b4c5 100644 (file)
@@ -62,11 +62,11 @@ public class Main {
         } catch (CommandException e) {
             System.err.println(e.getMessage());
             if (verboseLevel > 0 && e.getCause() != null) {
-                e.getCause().printStackTrace();
+                e.getCause().printStackTrace(System.err);
             }
             status = getStatusForError(e);
         } catch (Throwable e) {
-            e.printStackTrace();
+            e.printStackTrace(System.err);
             status = 2;
         }
         System.exit(status);
@@ -115,7 +115,7 @@ public class Main {
             case IOErrorException ioErrorException -> 3;
             case UntrustedKeyErrorException untrustedKeyErrorException -> 4;
             case RateLimitErrorException rateLimitErrorException -> 5;
-            case null, default -> 2;
+            case null -> 2;
         };
     }
 }