Skip to content

Commit a1500c3

Browse files
committed
Unhandled -> UnhandledTerminal
1 parent 352fd01 commit a1500c3

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/Sentry/Internal/Hub.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ private SentryId CaptureEvent(SentryEvent evt, SentryHint? hint, Scope scope)
585585
scope.LastEventId = id;
586586
scope.SessionUpdate = null;
587587

588-
if (evt.GetExceptionType() is SentryEvent.ExceptionType.Unhandled
588+
if (evt.GetExceptionType() is SentryEvent.ExceptionType.UnhandledTerminal
589589
&& scope.Transaction is { } transaction)
590590
{
591591
// Event contains a terminal exception -> finish any current transaction as aborted

src/Sentry/Platforms/Android/LogCatAttachmentEventProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public SentryEvent Process(SentryEvent @event, SentryHint hint)
5555
// Only send logcat logs if the event is unhandled if the integration is set to Unhandled
5656
if (_logCatIntegrationType == LogCatIntegrationType.Unhandled)
5757
{
58-
if (exceptionType != SentryEvent.ExceptionType.Unhandled && exceptionType != SentryEvent.ExceptionType.UnhandledNonTerminal)
58+
if (exceptionType != SentryEvent.ExceptionType.UnhandledTerminal && exceptionType != SentryEvent.ExceptionType.UnhandledNonTerminal)
5959
{
6060
return @event;
6161
}

src/Sentry/SentryClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ private SentryId DoSendEvent(SentryEvent @event, SentryHint? hint, Scope? scope)
355355
scope.SessionUpdate = _sessionManager.EndSession(SessionEndStatus.Unhandled);
356356
break;
357357

358-
case SentryEvent.ExceptionType.Unhandled:
358+
case SentryEvent.ExceptionType.UnhandledTerminal:
359359
_options.LogDebug("Ending session as 'Crashed', due to unhandled exception.");
360360
scope.SessionUpdate = _sessionManager.EndSession(SessionEndStatus.Crashed);
361361
break;

src/Sentry/SentryEvent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ internal enum ExceptionType
182182
{
183183
None,
184184
Handled,
185-
Unhandled,
185+
UnhandledTerminal,
186186
UnhandledNonTerminal
187187
}
188188

@@ -200,7 +200,7 @@ internal ExceptionType GetExceptionType()
200200

201201
if (HasUnhandledException())
202202
{
203-
return ExceptionType.Unhandled;
203+
return ExceptionType.UnhandledTerminal;
204204
}
205205

206206
return ExceptionType.Handled;

test/Sentry.Tests/Protocol/SentryEventTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public void GetExceptionType_UnhandledTerminalException_ReturnsUnhandled()
204204
exception.SetSentryMechanism("AppDomain.UnhandledException", handled: false, terminal: true);
205205
var evt = new SentryEvent(exception);
206206

207-
Assert.Equal(SentryEvent.ExceptionType.Unhandled, evt.GetExceptionType());
207+
Assert.Equal(SentryEvent.ExceptionType.UnhandledTerminal, evt.GetExceptionType());
208208
}
209209

210210
[Fact]
@@ -215,7 +215,7 @@ public void GetExceptionType_UnhandledTerminalExceptionViaSentryExceptions_Retur
215215
SentryExceptions = [new SentryException { Mechanism = new Mechanism { Handled = false } }]
216216
};
217217

218-
Assert.Equal(SentryEvent.ExceptionType.Unhandled, evt.GetExceptionType());
218+
Assert.Equal(SentryEvent.ExceptionType.UnhandledTerminal, evt.GetExceptionType());
219219
}
220220

221221
[Fact]

0 commit comments

Comments
 (0)