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:
parent
9ab39ea3ea
commit
41dfa81fb1
2 changed files with 21 additions and 2 deletions
|
@ -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
17
room.patch
Normal 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) {
|
Loading…
Reference in a new issue