Skip to content

Commit f89f9d4

Browse files
Fix Android managed exception issues (#1688)
1 parent eccc233 commit f89f9d4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Sentry/Android/SentrySdk.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ public static IDisposable Init(
4040
{
4141
o.Dsn = options.Dsn;
4242
//TODO: we'll need to pass other stuff here from SentryOptions to SentryAndroidOptions
43+
44+
// Don't capture managed exceptions in the native SDK, since we already capture them in the managed SDK
45+
o.AddIgnoredExceptionForType(Class.ForName("android.runtime.JavaProxyThrowable"));
46+
4347
}));
4448

4549
options.CrashedLastRun = () => Sentry.Java.Sentry.IsCrashedLastRun()?.BooleanValue() is true;

src/Sentry/SentryOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ public SentryOptions()
668668
"IdentityModel",
669669
"SqlitePclRaw",
670670
"Xamarin",
671+
"Android.", // Ex: Android.Runtime.JNINativeWrapper...
671672
"Google.",
672673
"MongoDB.",
673674
"Remotion.Linq",

0 commit comments

Comments
 (0)