Catch OOM on ROOM compute call

pull/187/head
M66B 4 years ago
parent 18d2428f8e
commit 1459e89ea5

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

Loading…
Cancel
Save