chore: Demonstrate screen capture in mobile samples#5040
chore: Demonstrate screen capture in mobile samples#5040jamescrosswell wants to merge 3 commits intomainfrom
Conversation
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5040 +/- ##
==========================================
+ Coverage 74.01% 74.02% +0.01%
==========================================
Files 499 499
Lines 18065 18065
Branches 3518 3518
==========================================
+ Hits 13370 13373 +3
+ Misses 3836 3834 -2
+ Partials 859 858 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Flash0ver
left a comment
There was a problem hiding this comment.
Got a few questions / notes about consistency and link correctness.
|
|
||
| // If your app doesn't have sensitive data, you can attach screenshots automatically when a Java/native | ||
| // error is captured. | ||
| // Note: this only applies to Java-based errors; .NET managed exceptions are not currently supported. |
There was a problem hiding this comment.
question: Note for iOS?
Does this Note also apply to both the iOS and Mac Catalyst samples?
There was a problem hiding this comment.
Tbh, I can't remember where I copied this from (presumably some documentation for the Android SDK but I can no longer find it).
Let's just remove this line as it's potentially confusing.
To answer your question though, I think yes this would apply to both Android and iOS... it'd to do with the order in which the signal handlers fire and .NET will try to insert it's own signal handler in the queue first so that if an exception occurs in what was, originally, managed code, it gets handled by the .NET exception handler (e.g. a try..catch block). The native SDK that is capturing screenshots (per this setting) will only get activated when capturing native exceptions (i.e. if .NET's signal handler didn't already fire).
@jpnurmi does it sound like I've got that right? You've been going deep down the rabbit hole on this recently...
There was a problem hiding this comment.
Yeah, with today's signal-handling order, both sentry-native and sentry-cocoa step on the .NET runtime's toes and accidentally handle certain .NET exceptions as fatal.
Resolves #4117