public final class ReportBuilder extends Object
Constructor and Description |
---|
ReportBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
build(ReportExecutor reportExecutor)
Assembles and sends the crash report.
|
ReportBuilder |
customData(Map<String,String> customData)
Sets additional values to be added to
ReportField.CUSTOM_DATA . |
ReportBuilder |
customData(String key,
String value)
Sets an additional value to be added to
ReportField.CUSTOM_DATA . |
ReportBuilder |
endApplication()
Ends the application after sending the crash report
|
ReportBuilder |
exception(Throwable e)
Set the stack trace to be reported
|
Map<String,String> |
getCustomData() |
Throwable |
getException() |
String |
getMessage() |
Thread |
getUncaughtExceptionThread() |
boolean |
isEndApplication() |
boolean |
isSendSilently() |
ReportBuilder |
message(String msg)
Set the error message to be reported.
|
ReportBuilder |
sendSilently()
Forces the report to be sent silently, ignoring all interactions
|
ReportBuilder |
uncaughtExceptionThread(Thread thread)
Sets the Thread on which an uncaught Exception occurred.
|
@NonNull public ReportBuilder message(@Nullable String msg)
msg
- the error messageReportBuilder
@Nullable public String getMessage()
@NonNull public ReportBuilder uncaughtExceptionThread(@Nullable Thread thread)
thread
- Thread on which an uncaught Exception occurred.ReportBuilder
@Nullable public Thread getUncaughtExceptionThread()
@NonNull public ReportBuilder exception(@Nullable Throwable e)
e
- The exception that should be associated with this reportReportBuilder
@Nullable public Throwable getException()
@NonNull public ReportBuilder customData(@NonNull Map<String,String> customData)
ReportField.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 String key, String value)
ReportField.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 Map<String,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.