getsentry / getsentry/sentry-cocoa

Attach a custom stacktrace when capturing an exception

Open
#741 17 comments 0 reactions 0 assignees View on GitHub
Cocoa Errors Feature up-for-grabs
Dominant language
Swift
Stars
1.1k
Forks
418
Avg merge
2d 3h
Merged PRs (30d)
106

Description

*Platform:*

- [X] iOS
- [ ] tvOS
- [ ] MacOS
- [ ] watchOS

*Swift:*

- [X] Yes -> any
- [ ] No

*sentry-cocoa installed with:*

- [X] CocoaPods
- [ ] Carthage
- [ ] Manually

Version of sentry-cocoa:
**5.2.2**

---

**I have the following issue:**

I'm writing a sample that uses Sentry for [the CrashKiOs library](). The library basically lets you create a custom NSException with a custom stacktrace [(here]() for reference) and I want to log this exception with Sentry. But I noticed that this custom stacktrace is never uploaded.

After digging in the source code, I've noticed that the capture method does not use the `callStackReturnAddresses` of the exception passed in the capture method but it adds it builds it for the current thread.

There is already the possibility to append a custom stacktrace and I haven't found it? If not, there is any possibility to add it in the future? With Firebase Crashalytics or Bugsnag you can but I prefer using Sentry

**Steps to reproduce:**

To reproduce the issue, [I've uploaded the WIP sample](). In the same repo you can find also the working sample for Crashalytics and Bugsnag

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.