From f48593f26551f7719beda57c755eab30e1e89703 Mon Sep 17 00:00:00 2001 From: AsamK Date: Sun, 12 Sep 2021 14:37:56 +0200 Subject: [PATCH] Exit immediately if an uncaught error is thrown on the main thread --- src/main/java/org/asamk/signal/Main.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/asamk/signal/Main.java b/src/main/java/org/asamk/signal/Main.java index fc63b89e..26079ec6 100644 --- a/src/main/java/org/asamk/signal/Main.java +++ b/src/main/java/org/asamk/signal/Main.java @@ -56,6 +56,9 @@ public class Main { e.getCause().printStackTrace(); } status = getStatusForError(e); + } catch (Throwable e) { + e.printStackTrace(); + status = 2; } System.exit(status); }