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

Add the stacktrace to Errors #695

Merged
merged 2 commits into from
Sep 13, 2021
Merged

Add the stacktrace to Errors #695

merged 2 commits into from
Sep 13, 2021

Conversation

imjoehaines
Copy link
Contributor

Goal

Adds the stacktrace to Error instances; this is the same stacktrace hash that the exceptions array uses (i.e. we're not duplicating it). This means the stacktrace can be modified on an Error instance and the changes will be reflected in the payload that's send to Bugsnag

Design

To make the stacktrace readonly, I've made Error a plain class instead of a Struct; I think this is better than messing around with the struct to get a readonly field (especially given the number of Rubies we support) and we don't really need most of the struct API anyway

Testing

Had to tweak the existing tests as we can't directly compare Error instances without having identical stacktraces, which isn't really feasible

@imjoehaines imjoehaines merged commit bc36cd1 into next Sep 13, 2021
@imjoehaines imjoehaines deleted the add-stacktrace-to-errors branch September 13, 2021 08:30
@imjoehaines imjoehaines mentioned this pull request Sep 17, 2021
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.

2 participants