diff --git a/base/src/main/java/de/staropensource/sosengine/base/data/info/EngineInformation.java b/base/src/main/java/de/staropensource/sosengine/base/data/info/EngineInformation.java index 00abbcf..8fb43af 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/data/info/EngineInformation.java +++ b/base/src/main/java/de/staropensource/sosengine/base/data/info/EngineInformation.java @@ -401,7 +401,10 @@ public final class EngineInformation { gitProperties.load(gitStream); gitStream.close(); } catch (IOException exception) { - logger.crash("Unable to load build information: InputStream 'gitStream' failed", exception); + StackTraceParser parser = new StackTraceParser(exception); + System.out.println("Unable to load build information: InputStream 'gitStream' failed"); + System.out.println(parser.getHeader() + "\n" + parser.getStackTrace()); + Engine.getInstance().shutdown(69); return; } } @@ -434,8 +437,12 @@ public final class EngineInformation { GregorianCalendar calendar = new GregorianCalendar(); calendar.setTime(date); gitCommitTime = calendar.toZonedDateTime(); - } catch (ParseException e) { - logger.crash("Unable to load build information: Can't parse \"" + gitParser.getString("git.commit.time") + "\" using format \"yyyy-MM-dd'T'HH:mmZ\""); + } catch (ParseException exception) { + StackTraceParser parser = new StackTraceParser(exception); + System.out.println("Unable to load build information: Can't parse \"" + gitParser.getString("git.commit.time") + "\" using format \"yyyy-MM-dd'T'HH:mmZ\""); + System.out.println(parser.getHeader() + "\n" + parser.getStackTrace()); + Engine.getInstance().shutdown(69); + return; } gitCommitterName = gitParser.getString("git.commit.user.name"); gitCommitterEmail = gitParser.getString("git.commit.user.email"); diff --git a/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java b/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java index 307d94b..91dd53b 100644 --- a/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java +++ b/base/src/main/java/de/staropensource/sosengine/base/logging/CrashHandler.java @@ -22,17 +22,19 @@ package de.staropensource.sosengine.base.logging; import de.staropensource.sosengine.base.Engine; import de.staropensource.sosengine.base.EngineConfiguration; import de.staropensource.sosengine.base.classes.Placeholder; -import de.staropensource.sosengine.base.events.EngineCrashEvent; -import de.staropensource.sosengine.base.logging.placeholders.crashhandler.*; import de.staropensource.sosengine.base.classes.logging.LogIssuer; import de.staropensource.sosengine.base.classes.logging.LogLevel; +import de.staropensource.sosengine.base.events.EngineCrashEvent; +import de.staropensource.sosengine.base.logging.placeholders.crashhandler.*; import de.staropensource.sosengine.base.utility.PlaceholderEngine; import lombok.Getter; import lombok.Setter; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.*; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; /** * Handles engine and application crashes.