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

Cache unhandled exceptions prior to delivery #139

Merged
merged 1 commit into from
Jan 12, 2017

Conversation

kattrali
Copy link
Contributor

Previously, unhandled exceptions were sent immediately to the server,
blocking the current thread. In the case that the blocked thread was the
main thread, this caused an exception and prevented the report from
being sent or cached after the fact because the app would then terminate.

This change introduces a third delivery style (in addition to blocking
and non-blocking) which writes the report to the error cache and then
delivers asynchronously (ASYNC_WITH_CACHE).

Fixes #138

Previously, unhandled exceptions were sent immediately to the server,
blocking the current thread. In the case that the blocked thread was the
main thread, this caused an exception and prevented the report from
being sent or cached after the fact because the app would then terminate.

This change introduces a third delivery style (in addition to blocking
and non-blocking) which writes the report to the error cache and then
delivers asynchronously (ASYNC_WITH_CACHE).

Fixes #138
@loopj
Copy link
Contributor

loopj commented Jan 12, 2017

@kattrali did you test these changes on a device or in a simulator - that's the best way to see if Android craps out NetworkOnMainThreadException. Also - we should definitely add a failing test to our test suite for the previous release.

@kattrali
Copy link
Contributor Author

On a device - I can confirm that in the prior release the reports are not sent and this change fixes the regression.

I'm open to the test but I'm not sure how we can add a crash to the suite directly, unless I misunderstood.

@kattrali kattrali merged commit 4725d87 into master Jan 12, 2017
@kattrali kattrali deleted the kattrali/cache-unhandled-errors branch January 12, 2017 21:08
lemnik pushed a commit that referenced this pull request Jun 2, 2021
Create tasks for debug variant which are not run by default
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