throw new NullPointerException("Cannot execute crash because throwable is null.");
LOG.error("Cannot keep up application! : {}", e.toString());
LOG.error(outputReport());
+ crashReportLines.outCrashReport();
System.exit(estimateExitCode);
}
str = (E) "\n";
builder.append(str).append("\n");
}
+ return builder.toString();
+ }
+ @SuppressWarnings("unchecked")
+ public boolean emptyLine() {
+ return store.add((E) EMPTY_LINE_PLACEHOLDER);
+ }
+
+ public void outCrashReport() {
try {
FileWriter writer = new FileWriter(Paths.get("Crash-Report/" + FORMAT.format(new Date()) + ".txt").toFile());
- writer.write(builder.toString());
+ writer.write(generateCrashReport());
writer.close();
} catch (IOException e) {
LoggerFactory.getLogger(CrashReportList.class).error("Cannot write crash report.", e);
}
- return builder.toString();
- }
-
- @SuppressWarnings("unchecked")
- public boolean emptyLine() {
- return store.add((E) EMPTY_LINE_PLACEHOLDER);
}
}