-
Notifications
You must be signed in to change notification settings - Fork 249
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
fix(datastore): prevent unhandled exception crashing App rebuilding s… #2549
Conversation
latch.await() | ||
try { | ||
latch.await() | ||
} catch (e: InterruptedException) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the only exception we care about? Should this be catch (e: Exception)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea await
throws only InterruptedException
.
904c015
to
054ea68
Compare
054ea68
to
6464555
Compare
Codecov Report
@@ Coverage Diff @@
## main #2549 +/- ##
==========================================
+ Coverage 45.70% 46.01% +0.30%
==========================================
Files 360 364 +4
Lines 10926 11028 +102
==========================================
+ Hits 4994 5074 +80
- Misses 5932 5954 +22
Flags with carried forward coverage won't be shown. Click here to find out more.
|
## Fixes - fix(datastore): prevent unhandled exception crashing App rebuilding sync expression (aws-amplify#2549) - fix(datastore): Upgrading from Datastore 0.6.1 to 0.6.8 causes Android app to crash (aws-amplify#2556) ## Cherry Picks - 160674d - 7121ebc - 957d6b4 - 5ec55b9 - 33df283 - 5ec023b - 51f5e56 - fab55ae - 6bd4182 - 6464555 - 2a7caae
## Fixes - fix(datastore): prevent unhandled exception crashing App rebuilding sync expression (aws-amplify#2549) - fix(datastore): Upgrading from Datastore 0.6.1 to 0.6.8 causes Android app to crash (aws-amplify#2556) ## Cherry Picks - 160674d - 7121ebc - 957d6b4 - 5ec55b9 - 33df283 - 5ec023b - 51f5e56 - fab55ae - 6bd4182 - 6464555 - 2a7caae
- fix(datastore): prevent unhandled exception crashing App rebuilding sync expression (aws-amplify#2549) - fix(datastore): Upgrading from Datastore 0.6.1 to 0.6.8 causes Android app to crash (aws-amplify#2556) - fix(api): model helpers use targetNames in schemas with CPK enabled (aws-amplify#2559) - 160674d - 7121ebc - 957d6b4 - 5ec55b9 - 33df283 - 5ec023b - 51f5e56 - fab55ae - 6bd4182 - 6464555 - 2a7caae - 809190c
- fix(datastore): prevent unhandled exception crashing App rebuilding sync expression (#2549) - fix(datastore): Upgrading from Datastore 0.6.1 to 0.6.8 causes Android app to crash (#2556) - fix(api): model helpers use targetNames in schemas with CPK enabled (#2559) - 160674d - 7121ebc - 957d6b4 - 5ec55b9 - 33df283 - 5ec023b - 51f5e56 - fab55ae - 6bd4182 - 6464555 - 2a7caae - 809190c
…ync expression
Issue #, if available:
Related: #1816
Description of changes:
There is reported that a unhandled exception causes App to crash on Android while DataStore building sync expression for amplify-android implementation from Dart implementation. I haven't figure out why the latch await would be interrupted, at least we can handle this exception thrown from
latch.await()
to prevent App from crashing.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.