Fix engine initialization exception handling

This commit is contained in:
JeremyStar™ 2024-12-02 21:34:35 +01:00
parent 8d5cb0ce23
commit 19f6838300
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -289,10 +289,8 @@ public final class Engine extends SubsystemClass {
if (instance == null) if (instance == null)
new Engine(); new Engine();
} catch (RuntimeException exception) { } catch (RuntimeException exception) {
Logger.error("Engine initialization failed"); Logger.error("Engine initialization failed\n" + Miscellaneous.stacktraceAsStringRecursive(exception.getCause(), true, true));
Logger.error(Miscellaneous.throwableHeader(exception.getCause())); Logger.flush();
for (String line : Miscellaneous.stacktraceAsString(exception.getCause(), true).split("\n"))
Logger.error(line);
throw new RuntimeException("Engine initialization failed", exception.getCause()); throw new RuntimeException("Engine initialization failed", exception.getCause());
} }