| java.lang.Object | |
| ↳ | com.google.firebase.crash.FirebaseCrash |
Firebase Crash reporting API. The API is automatically initialized by FirebaseApp.
To report caught exceptions, use report(Throwable).
To attach log messages to a crash report, use log(String)
or logcat(int, String, String) at points during execution that
will best help you know what happened prior to the crash.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
FirebaseCrash instance configured with a firebaseApp.
| |||||||||||
Logs a message that will appear in a subsequent crash report.
| |||||||||||
Logs a message that will appear in a subsequent crash report as well as
in logcat.
| |||||||||||
Generates a crash report for the given caught exception.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
FirebaseCrash instance configured with a firebaseApp. Each instance registers an uncaught exception handler, so it should only be called once!
| firebaseApp | Used for configuration |
|---|
Logs a message that will appear in a subsequent crash report.
| message | the message to log |
|---|
Logs a message that will appear in a subsequent crash report as well as
in logcat. The logcat message will have the given log level and tag as
would be used by println(int, String, String).
| level | the log level, one of the log level constants from Log. |
|---|---|
| tag | the tag to use when logging to logcat |
| message | the message to log |
Generates a crash report for the given caught exception. This method should be used for unexpected exceptions where recovery is not possible. For example:
try {
// Some code here...
} catch (Exception e) {
// Don't know what to do with this...
FirebaseCrash.log("Caught an unexpected exception while doing some work");
FirebaseCrash.report(e);
}
| throwable | the caught exception to report |
|---|