On iOS it's possible to use recordError(error) to log non-fatal errors on Crashlytics but apparently this feature is not available for Android.
The only alternative I found is to use logException(e). I manage errors on my app and I want to log when specifics errors codes are returned. So, on Crashlytics I'd like the non-fatal errors to be referenced by the errorCode. But using the logException(e) method, errors are referenced by the method where logException(e) has been called.
How can I do that?
What I do in order to report a non-fatal issue is to log an exception using the following code (remember you can throw any subclass of Exception
):
Crashlytics.logException(new Exception("My custom error message"));