-
public final class ReportBuilderFluent API used to assemble the different options used for a crash report.
-
-
Field Summary
Fields Modifier and Type Field Description private Stringmessageprivate ThreaduncaughtExceptionThreadprivate Throwableexceptionprivate BooleanisSendSilentlyprivate BooleanisEndApplication
-
Constructor Summary
Constructors Constructor Description ReportBuilder()
-
Method Summary
Modifier and Type Method Description final StringgetMessage()final UnitsetMessage(String message)final ThreadgetUncaughtExceptionThread()final UnitsetUncaughtExceptionThread(Thread uncaughtExceptionThread)final ThrowablegetException()final UnitsetException(Throwable exception)final BooleangetIsSendSilently()final UnitsetIsSendSilently(Boolean isSendSilently)final BooleangetIsEndApplication()final UnitsetIsEndApplication(Boolean isEndApplication)final ReportBuildermessage(String msg)Set the error message to be reported. final ReportBuilderuncaughtExceptionThread(Thread thread)Sets the Thread on which an uncaught Exception occurred. final ReportBuilderexception(Throwable e)Set the stack trace to be reported final ReportBuildercustomData(Map<String, String> customData)Sets additional values to be added to org.acra.ReportField.CUSTOM_DATA. final ReportBuildercustomData(String key, String value)Sets an additional value to be added to org.acra.ReportField.CUSTOM_DATA. final Map<String, String>getCustomData()final ReportBuildersendSilently()Forces the report to be sent silently, ignoring all interactions final ReportBuilderendApplication()Ends the application after sending the crash report final Unitbuild(ReportExecutor reportExecutor)Assembles and sends the crash report. -
-
Method Detail
-
getMessage
final String getMessage()
-
setMessage
final Unit setMessage(String message)
-
getUncaughtExceptionThread
final Thread getUncaughtExceptionThread()
-
setUncaughtExceptionThread
final Unit setUncaughtExceptionThread(Thread uncaughtExceptionThread)
-
getException
final Throwable getException()
-
setException
final Unit setException(Throwable exception)
-
getIsSendSilently
final Boolean getIsSendSilently()
-
setIsSendSilently
final Unit setIsSendSilently(Boolean isSendSilently)
-
getIsEndApplication
final Boolean getIsEndApplication()
-
setIsEndApplication
final Unit setIsEndApplication(Boolean isEndApplication)
-
message
final ReportBuilder message(String msg)
Set the error message to be reported.
- Parameters:
msg- the error message
-
uncaughtExceptionThread
final ReportBuilder uncaughtExceptionThread(Thread thread)
Sets the Thread on which an uncaught Exception occurred.
- Parameters:
thread- Thread on which an uncaught Exception occurred.
-
exception
final ReportBuilder exception(Throwable e)
Set the stack trace to be reported
- Parameters:
e- The exception that should be associated with this report
-
customData
final ReportBuilder customData(Map<String, String> customData)
Sets additional values to be added to org.acra.ReportField.CUSTOM_DATA. Values specified here take precedence over globally specified custom data.
- Parameters:
customData- a map of custom key-values to be attached to the report
-
customData
final ReportBuilder customData(String key, String value)
Sets an additional value to be added to org.acra.ReportField.CUSTOM_DATA. The value specified here takes precedence over globally specified custom data.
- Parameters:
key- the key identifying the custom datavalue- the value for the custom data entry
-
getCustomData
final Map<String, String> getCustomData()
-
sendSilently
final ReportBuilder sendSilently()
Forces the report to be sent silently, ignoring all interactions
-
endApplication
final ReportBuilder endApplication()
Ends the application after sending the crash report
-
build
final Unit build(ReportExecutor reportExecutor)
Assembles and sends the crash report.
- Parameters:
reportExecutor- ReportExecutor to use to build the report.
-
-
-
-