mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-06 04:45:50 +01:00
Catch OOM on ROOM compute call
This commit is contained in:
@@ -92,7 +92,7 @@ class RoomTrackingLiveData<T> extends LiveData<T> {
|
|||||||
try {
|
try {
|
||||||
value = mComputeFunction.call();
|
value = mComputeFunction.call();
|
||||||
done = true;
|
done = true;
|
||||||
} catch (Exception e) {
|
} catch (Throwable e) {
|
||||||
if (++retry > 10)
|
if (++retry > 10)
|
||||||
throw new RuntimeException(
|
throw new RuntimeException(
|
||||||
"Exception while computing database live data.", e);
|
"Exception while computing database live data.", e);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
+ try {
|
+ try {
|
||||||
+ value = mComputeFunction.call();
|
+ value = mComputeFunction.call();
|
||||||
+ done = true;
|
+ done = true;
|
||||||
+ } catch (Exception e) {
|
+ } catch (Throwable e) {
|
||||||
+ if (++retry > 10)
|
+ if (++retry > 10)
|
||||||
+ throw new RuntimeException(
|
+ throw new RuntimeException(
|
||||||
+ "Exception while computing database live data.", e);
|
+ "Exception while computing database live data.", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user