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