]> nmode's Git Repositories - signal-cli/commitdiff
Exit immediately if an uncaught error is thrown on the main thread
authorAsamK <asamk@gmx.de>
Sun, 12 Sep 2021 12:37:56 +0000 (14:37 +0200)
committerAsamK <asamk@gmx.de>
Sun, 12 Sep 2021 12:37:56 +0000 (14:37 +0200)
src/main/java/org/asamk/signal/Main.java

index fc63b89e7f20ff1694161b1694ee41c57e6de7d6..26079ec6c2f8622be8081c76257bc632fef4f37e 100644 (file)
@@ -56,6 +56,9 @@ public class Main {
                 e.getCause().printStackTrace();
             }
             status = getStatusForError(e);
+        } catch (Throwable e) {
+            e.printStackTrace();
+            status = 2;
         }
         System.exit(status);
     }