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

Prevent crash due to "Exception while computing database"

This commit is contained in:
M66B 2019-07-27 13:53:30 +02:00
parent 9ab39ea3ea
commit 41dfa81fb1
2 changed files with 21 additions and 2 deletions

View file

@ -89,8 +89,10 @@ class RoomTrackingLiveData<T> extends LiveData<T> {
try {
value = mComputeFunction.call();
} catch (Exception e) {
throw new RuntimeException("Exception while computing database"
+ " live data.", e);
eu.faircode.email.Log.w(e);
//throw new RuntimeException("Exception while computing database"
// + " live data.", e);
computed = false;
}
}
if (computed) {

17
room.patch Normal file
View file

@ -0,0 +1,17 @@
diff --git a/app/src/main/java/androidx/room/RoomTrackingLiveData.java b/app/src/main/java/androidx/room/RoomTrackingLiveData.java
index 8df1014a4..f6086584b 100644
--- a/app/src/main/java/androidx/room/RoomTrackingLiveData.java
+++ b/app/src/main/java/androidx/room/RoomTrackingLiveData.java
@@ -89,8 +89,10 @@ class RoomTrackingLiveData<T> extends LiveData<T> {
try {
value = mComputeFunction.call();
} catch (Exception e) {
- throw new RuntimeException("Exception while computing database"
- + " live data.", e);
+ eu.faircode.email.Log.w(e);
+ //throw new RuntimeException("Exception while computing database"
+ // + " live data.", e);
+ computed = false;
}
}
if (computed) {