Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Falls back to thread stack trace if nil #51

Merged
merged 1 commit into from
May 28, 2024

Conversation

nikz
Copy link
Collaborator

@nikz nikz commented May 15, 2024

When you create an exception with .init the attached stackTrace is nil. This change falls back to the stackTrace for the current thread if that's the case

When you create an exception with `.init` the attached stackTrace is
nil. This change falls back to the stackTrace for the current thread if
that's the case
Copy link

@miquelbeltran miquelbeltran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created a small Swift UI example app, where I init the client and call to send. I was able to set a breakpoint on the trace creation, and saw that effectively NSArray *trace = exception.callStackSymbols was null, so [NSThread callStackSymbols] helped as an alternative.

Copy link
Collaborator

@sumitramanga sumitramanga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! 🤘

@nikz nikz merged commit 4fd3c12 into MindscapeHQ:master May 28, 2024
@nikz nikz deleted the fall-back-to-thread-trace branch May 28, 2024 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants