diff --git a/app/src/main/java/androidx/room/RoomTrackingLiveData.java b/app/src/main/java/androidx/room/RoomTrackingLiveData.java index 875beba9bc..7a013c4b2b 100644 --- a/app/src/main/java/androidx/room/RoomTrackingLiveData.java +++ b/app/src/main/java/androidx/room/RoomTrackingLiveData.java @@ -92,7 +92,7 @@ class RoomTrackingLiveData extends LiveData { 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); diff --git a/patches/RoomTrackingLiveData.patch b/patches/RoomTrackingLiveData.patch index bc1729bde9..1154fb7299 100644 --- a/patches/RoomTrackingLiveData.patch +++ b/patches/RoomTrackingLiveData.patch @@ -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);