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 user-available post-crash handler #88

Merged
merged 1 commit into from
Feb 5, 2016

Conversation

kattrali
Copy link
Contributor

@kattrali kattrali commented Feb 4, 2016

Fixes #34.

@snmaynard
Copy link
Contributor

As a separate feature/pr if required. We could add a pre-send handler. In there you could safely run objective-c code, but it wouldnt be in the crashing context. This would be good for adding user information or editing the stacktrace/grouping hash etc.

@@ -72,6 +74,9 @@ void BSSerializeDataCrashHandler(const KSCrashReportWriter *writer) {
if (g_bugsnag_data.stateJSON) {
writer->addJSONElement(writer, "state", g_bugsnag_data.stateJSON);
}
if (g_bugsnag_data.onCrash) {
g_bugsnag_data.onCrash();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we sensibly pass it anything? The writer? Could we do something sensible with the return value?

Usually we pass the payload in and you can edit it. And then the return value is a bool true/false to send it or not.

@kattrali kattrali force-pushed the kattrali/add-user-on-crash-handler branch from 8747bba to 4368381 Compare February 4, 2016 22:23
@kattrali
Copy link
Contributor Author

kattrali commented Feb 5, 2016

That's a good point. I was wondering how to integrate #17 with this, and I bet that would be cleanest.

kattrali added a commit that referenced this pull request Feb 5, 2016
Make post-crash handler available to users
@kattrali kattrali merged commit 28f8bbc into master Feb 5, 2016
@kattrali kattrali deleted the kattrali/add-user-on-crash-handler branch February 5, 2016 01:34
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