TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
220 stars 49 forks source link

Question: stacktrace parsing behavior #300

Closed hansmbakker closed 5 months ago

hansmbakker commented 5 months ago

Hi, I saw it is possible to convert an exception to Java.Lang.Throwable using Java.Lang.Throwable.FromException(ex): https://github.com/xamarin/xamarin-android/blob/1d24421106f5a07b7c150c4390e7d722fe4e618d/src/Mono.Android/Java.Lang/Throwable.cs#L248-L257

I see the Plugin.Firebase.Crashlytics code has its own logic to parse exceptions: https://github.com/TobiasBuchholz/Plugin.Firebase/blob/0cc53eb0604ab490fff9bd4569a9fac45804e0f7/src/Crashlytics/Platforms/Android/CrashlyticsException.cs#L12-L23

Could you please explain what Plugin.Firebase.Crashlytics does extra or different when dealing with exceptions?

AdamEssenmacher commented 5 months ago

The StackTraceParser is only used when manually recording managed (.NET) exceptions using the Plugin. Native crash/error reporting behavior is unchanged.

Check out this issue from this plugin's Crashlytics dependency.

hansmbakker commented 5 months ago

Thank you for the explanation!