catch two rare exceptions to fix crash

This commit is contained in:
Daniel Gultsch 2022-03-26 08:25:45 +01:00
parent 5943f1ad3e
commit 36756fbd41
2 changed files with 6 additions and 2 deletions

View file

@ -722,7 +722,7 @@ public class FileBackend {
if (cursor != null && cursor.moveToFirst()) { if (cursor != null && cursor.moveToFirst()) {
filename = cursor.getString(0); filename = cursor.getString(0);
} }
} catch (final SecurityException | IllegalArgumentException e) { } catch (final Exception e) {
filename = null; filename = null;
} }
if (filename == null) { if (filename == null) {

View file

@ -256,7 +256,11 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded {
//do nothing //do nothing
} else { } else {
Log.d(Config.LOGTAG, a.getJid().asBareJid().toString() + ": error executing mam: " + p.toString()); Log.d(Config.LOGTAG, a.getJid().asBareJid().toString() + ": error executing mam: " + p.toString());
finalizeQuery(query, true); try {
finalizeQuery(query, true);
} catch (final IllegalStateException e) {
//ignored
}
} }
}); });
} else { } else {