Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/Sentry.Unity/Integrations/UnityErrorLogException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal class UnityErrorLogException : Exception
private readonly SentryOptions? _options;
private readonly IDiagnosticLogger? _logger;

public UnityErrorLogException(string logString, string logStackTrace, SentryOptions? options)
public UnityErrorLogException(string logString, string logStackTrace, SentryOptions? options) : base(logString)
{
_logString = logString;
_logStackTrace = logStackTrace;
Expand Down Expand Up @@ -54,7 +54,9 @@ public SentryException ToSentryException()
Mechanism = new Mechanism
{
Handled = true,
Type = "unity.log"
Type = "unity.log",
Synthetic = true,
Data = { {Mechanism.TerminalKey, false} }
}
};
}
Expand Down
3 changes: 1 addition & 2 deletions src/Sentry.Unity/Integrations/UnityLogHandlerIntegration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ internal void CaptureException(Exception exception, UnityEngine.Object? context)
// NOTE: This might not be entirely true, as a user could as well call `Debug.LogException`
// and expect a handled exception but it is not possible for us to differentiate
// https://docs.sentry.io/platforms/unity/troubleshooting/#unhandled-exceptions---debuglogexception
exception.Data[Mechanism.HandledKey] = false;
exception.Data[Mechanism.MechanismKey] = "Unity.LogException";
exception.SetSentryMechanism("Unity.LogException", handled: false, terminal: false);
_ = _hub.CaptureException(exception);
}

Expand Down
Loading