Exit immediately if an uncaught error is thrown on the main thread

This commit is contained in:
AsamK 2021-09-12 14:37:56 +02:00
parent 62d8873a92
commit f48593f265

View file

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