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 unhandled override support for unhandled errors #921

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

kstenerud
Copy link
Contributor

@kstenerud kstenerud commented Dec 2, 2020

Goal

With the last override PR, we now support overriding the unhandled status of handled exceptions (allowing the user to mark handled errors as "unhanded". This PR adds functionality to mark "unhandled" errors as "handled", setting the same "unhandledOverridden" field whenever this happens.

Design

See ROAD-732

Changeset

BugsnagEvent now detects whether an error has changed from unhandled to handled or vice versa, and sets unhandledOverridden to mark when it happens, adjusting handledCount and unhandledCount to compensate.

unhandledOverridden only gets encoded to JSON when it's true.

Testing

Added "override" versions of the unhandled exception tests which change unhandled to false in a crash callback function.

@kstenerud kstenerud force-pushed the 5454-unhandled-override-2 branch 4 times, most recently from 2d4c98e to 32c221f Compare December 3, 2020 12:26
@kstenerud kstenerud changed the base branch from master to next December 3, 2020 12:55
@kstenerud kstenerud marked this pull request as ready for review December 3, 2020 12:57
@nickdowell
Copy link
Contributor

I'm a little concerned about the effect that adding so many new E2E scenarios will have on the run time. I think there's a 1 hour time limit which exceeding will result in a failure.

Is it important to check the unhandled -> handled override for so many different types of crashes?

@kstenerud
Copy link
Contributor Author

Hmm I suppose since the same path is taken by all unhandled exceptions, we'd only really need it in one place.

@kstenerud kstenerud force-pushed the 5454-unhandled-override-2 branch 2 times, most recently from e6bc161 to 1b4da42 Compare December 3, 2020 15:23
Bugsnag/Payload/BugsnagEvent.m Outdated Show resolved Hide resolved
Bugsnag/Payload/BugsnagEvent.m Outdated Show resolved Hide resolved
@kstenerud kstenerud merged commit ee7cac8 into next Dec 7, 2020
@kstenerud kstenerud deleted the 5454-unhandled-override-2 branch December 7, 2020 09:53
This was referenced Dec 8, 2020
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