public class CrashReport
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.Throwable |
cause
The Throwable that is the "cause" for this crash and Crash Report.
|
private java.io.File |
crashReportFile
File of crash report.
|
private java.util.List<CrashReportCategory> |
crashReportSections |
private java.lang.String |
description
Description of the crash report.
|
private boolean |
field_85059_f |
private static org.apache.logging.log4j.Logger |
logger |
private java.lang.StackTraceElement[] |
stacktrace |
private CrashReportCategory |
theReportCategory
Category of crash
|
Constructor and Description |
---|
CrashReport(java.lang.String descriptionIn,
java.lang.Throwable causeThrowable) |
Modifier and Type | Method and Description |
---|---|
CrashReportCategory |
getCategory() |
java.lang.String |
getCauseStackTraceOrString()
Gets the stack trace of the Throwable that caused this crash report, or if that fails, the cause .toString().
|
java.lang.String |
getCompleteReport()
Gets the complete report with headers, stack trace, and different sections as a string.
|
java.lang.Throwable |
getCrashCause()
Returns the Throwable object that is the cause for the crash and Crash Report.
|
java.lang.String |
getDescription()
Returns the description of the Crash Report.
|
java.io.File |
getFile()
Gets the file this crash report is saved into.
|
void |
getSectionsInStringBuilder(java.lang.StringBuilder builder)
Gets the various sections of the crash report into the given StringBuilder
|
private static java.lang.String |
getWittyComment()
Gets a random witty comment for inclusion in this CrashReport
|
CrashReportCategory |
makeCategory(java.lang.String name)
Creates a CrashReportCategory
|
CrashReportCategory |
makeCategoryDepth(java.lang.String categoryName,
int stacktraceLength)
Creates a CrashReportCategory for the given stack trace depth
|
static CrashReport |
makeCrashReport(java.lang.Throwable causeIn,
java.lang.String descriptionIn)
Creates a crash report for the exception
|
private void |
populateEnvironment()
Populates this crash report with initial information about the running server and operating system / java
environment
|
boolean |
saveToFile(java.io.File toFile)
Saves this CrashReport to the given file and returns a value indicating whether we were successful at doing so.
|
private static final org.apache.logging.log4j.Logger logger
private final java.lang.String description
private final java.lang.Throwable cause
private final CrashReportCategory theReportCategory
private final java.util.List<CrashReportCategory> crashReportSections
private java.io.File crashReportFile
private boolean field_85059_f
private java.lang.StackTraceElement[] stacktrace
public CrashReport(java.lang.String descriptionIn, java.lang.Throwable causeThrowable)
private void populateEnvironment()
public java.lang.String getDescription()
public java.lang.Throwable getCrashCause()
public void getSectionsInStringBuilder(java.lang.StringBuilder builder)
public java.lang.String getCauseStackTraceOrString()
public java.lang.String getCompleteReport()
public java.io.File getFile()
public boolean saveToFile(java.io.File toFile)
public CrashReportCategory getCategory()
public CrashReportCategory makeCategory(java.lang.String name)
public CrashReportCategory makeCategoryDepth(java.lang.String categoryName, int stacktraceLength)
private static java.lang.String getWittyComment()
public static CrashReport makeCrashReport(java.lang.Throwable causeIn, java.lang.String descriptionIn)