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)
new Engine();
} catch (RuntimeException exception) {
Logger.error("Engine initialization failed");
Logger.error(Miscellaneous.throwableHeader(exception.getCause()));
for (String line : Miscellaneous.stacktraceAsString(exception.getCause(), true).split("\n"))
Logger.error(line);
Logger.error("Engine initialization failed\n" + Miscellaneous.stacktraceAsStringRecursive(exception.getCause(), true, true));
Logger.flush();
throw new RuntimeException("Engine initialization failed", exception.getCause());
}