Skip to content

Commit 366112f

Browse files
committed
fix: suppress SIGABRT and EXC_BAD_ACCESS during Cocoa SDK init
1 parent 3f12094 commit 366112f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/Sentry/Platforms/Cocoa/SentrySdk.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,6 @@ private static CocoaSdk.SentryHttpStatusCodeRange[] GetFailedRequestStatusCodes(
200200
/// </summary>
201201
internal static CocoaSdk.SentryEvent? ProcessOnBeforeSend(SentryOptions options, CocoaSdk.SentryEvent evt, IHub hub)
202202
{
203-
if (hub is DisabledHub)
204-
{
205-
return evt;
206-
}
207-
208203
// When we have an unhandled managed exception, we send that to Sentry twice - once managed and once native.
209204
// The managed exception is what a .NET developer would expect, and it is sent by the Sentry.NET SDK
210205
// But we also get a native SIGABRT since it crashed the application, which is sent by the Sentry Cocoa SDK.
@@ -239,6 +234,11 @@ private static CocoaSdk.SentryHttpStatusCodeRange[] GetFailedRequestStatusCodes(
239234
}
240235
}
241236

237+
if (hub is DisabledHub)
238+
{
239+
return evt;
240+
}
241+
242242
// We run our SIGABRT checks first before running managed processors.
243243
// Because we delegate to user code, we need to catch/log exceptions.
244244
try

0 commit comments

Comments
 (0)