forked from StarOpenSource/Engine
Fix even more EngineInformation startup exceptions
This commit is contained in:
parent
1a42e4bbc6
commit
7c21503532
2 changed files with 15 additions and 6 deletions
|
@ -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");
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue