@@ -0,0 +1,1016 @@
+package org.cobbzilla.util.system;%0A%0Aimport lombok.AllArgsConstructor;%0Aimport lombok.extern.slf4j.Slf4j;%0A%0Aimport static org.cobbzilla.util.daemon.ZillaRuntime.shortError;%0Aimport static org.cobbzilla.util.daemon.ZillaRuntime.stacktrace;%0A%0A@AllArgsConstructor @Slf4j%0Apublic class OutOfMemoryErrorUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler %7B%0A%0A    public static final OutOfMemoryErrorUncaughtExceptionHandler EXIT_ON_OOME = new OutOfMemoryErrorUncaughtExceptionHandler();%0A%0A    private final int status;%0A%0A    public OutOfMemoryErrorUncaughtExceptionHandler() %7B status = 2; %7D%0A%0A    @Override public void uncaughtException(Thread t, Throwable e) %7B%0A        if (e instanceof OutOfMemoryError) %7B%0A            try %7B%0A                log.error(%22!!!!! OutOfMemoryError: calling System.exit(%22+status+%22) from: %22 + stacktrace(t));%0A            %7D catch (Throwable ignored) %7B%7D%0A            System.exit(status);%0A        %7D else %7B%0A            log.error(%22!!!!! Uncaught Exception: %22 + shortError(e));%0A        %7D%0A    %7D%0A%0A%7D%0A

add OutOfMemoryErrorUncaughtExceptionHandler