1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-21 23:32:51 +00:00

Catch OOM on ROOM compute call

This commit is contained in:
M66B 2020-11-05 12:56:12 +01:00
parent 18d2428f8e
commit 1459e89ea5
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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);