mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 18:00:02 +01:00
Make LiveRecipientCache throw exceptions instead of errors.
Errors were causing crash loops if they occur in a job. This will still allow the app to crash, but prevent loops.
This commit is contained in:
@@ -400,7 +400,7 @@ public class RecipientDatabase extends Database {
|
||||
if (cursor != null && cursor.moveToNext()) {
|
||||
return getRecipientSettings(context, cursor);
|
||||
} else {
|
||||
throw new MissingRecipientError(id);
|
||||
throw new MissingRecipientException(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1928,8 +1928,8 @@ public class RecipientDatabase extends Database {
|
||||
}
|
||||
}
|
||||
|
||||
public static class MissingRecipientError extends AssertionError {
|
||||
public MissingRecipientError(@Nullable RecipientId id) {
|
||||
public static class MissingRecipientException extends IllegalStateException {
|
||||
public MissingRecipientException(@Nullable RecipientId id) {
|
||||
super("Failed to find recipient with ID: " + id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user