Caught Exceptions

In addition to automatically reporting your app’s crashes, Crashlytics for Android lets you log caught exceptions in your app’s catch blocks. Add a call to Crashlytics.logException(Exception) to your catch block:

try {
  myMethodThatThrows();
} catch (Exception e) {
  Crashlytics.logException(e);
  // handle your exception here!
}

All logged exceptions will appear as “non-fatal” issues in the Fabric dashboard. Your issue summary will contain all the state information you are use to getting from crashes along with breakdowns by Android version and hardware device.

Note

For any individual app session, only the most recent 8 logged exceptions are stored.

Crashlytics processes exceptions on a dedicated background thread, so the performance impact to your app is minimal. To reduce your users’ network traffic, Crashlytics batches logged exceptions together and sends them the next time the app launches.