public final class ReportBuilder
extends java.lang.Object
Constructor and Description |
---|
ReportBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
build(ReportExecutor reportExecutor)
Assembles and sends the crash report.
|
ReportBuilder |
customData(java.util.Map<java.lang.String,java.lang.String> customData)
Sets additional values to be added to
CUSTOM_DATA . |
ReportBuilder |
customData(java.lang.String key,
java.lang.String value)
Sets an additional value to be added to
CUSTOM_DATA . |
ReportBuilder |
endApplication()
Ends the application after sending the crash report
|
ReportBuilder |
exception(java.lang.Throwable e)
Set the stack trace to be reported
|
java.util.Map<java.lang.String,java.lang.String> |
getCustomData() |
java.lang.Throwable |
getException() |
java.lang.String |
getMessage() |
java.lang.Thread |
getUncaughtExceptionThread() |
boolean |
isEndApplication() |
boolean |
isSendSilently() |
ReportBuilder |
message(java.lang.String msg)
Set the error message to be reported.
|
ReportBuilder |
sendSilently()
Forces the report to be sent silently, ignoring the default interaction mode set in the config
|
ReportBuilder |
uncaughtExceptionThread(java.lang.Thread thread)
Sets the Thread on which an uncaught Exception occurred.
|
@NonNull public ReportBuilder message(@Nullable java.lang.String msg)
msg
- the error messageReportBuilder
@Nullable public java.lang.String getMessage()
@NonNull public ReportBuilder uncaughtExceptionThread(@Nullable java.lang.Thread thread)
thread
- Thread on which an uncaught Exception occurred.ReportBuilder
@Nullable public java.lang.Thread getUncaughtExceptionThread()
@NonNull public ReportBuilder exception(@Nullable java.lang.Throwable e)
e
- The exception that should be associated with this reportReportBuilder
@Nullable public java.lang.Throwable getException()
@NonNull public ReportBuilder customData(@NonNull java.util.Map<java.lang.String,java.lang.String> customData)
CUSTOM_DATA
. Values
specified here take precedence over globally specified custom data.customData
- a map of custom key-values to be attached to the reportReportBuilder
@NonNull public ReportBuilder customData(@NonNull java.lang.String key, java.lang.String value)
CUSTOM_DATA
. The value
specified here takes precedence over globally specified custom data.key
- the key identifying the custom datavalue
- the value for the custom data entryReportBuilder
@NonNull public java.util.Map<java.lang.String,java.lang.String> getCustomData()
@NonNull public ReportBuilder sendSilently()
ReportBuilder
public boolean isSendSilently()
@NonNull public ReportBuilder endApplication()
ReportBuilder
public boolean isEndApplication()
public void build(@NonNull ReportExecutor reportExecutor)
reportExecutor
- ReportExecutor to use to build the report.