mirror of
https://github.com/samsonjs/media.git
synced 2026-04-01 10:35:48 +00:00
Handle SQLiteException when trying to accessing DatabaseProvider#getReadableDatabase()
This commit is contained in:
parent
eb8fffba15
commit
3c09cbd8d4
1 changed files with 9 additions and 5 deletions
|
|
@ -794,11 +794,15 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
|
||||
@Override
|
||||
public boolean exists() throws DatabaseIOException {
|
||||
return VersionTable.getVersion(
|
||||
databaseProvider.getReadableDatabase(),
|
||||
VersionTable.FEATURE_CACHE_CONTENT_METADATA,
|
||||
checkNotNull(hexUid))
|
||||
!= VersionTable.VERSION_UNSET;
|
||||
try {
|
||||
return VersionTable.getVersion(
|
||||
databaseProvider.getReadableDatabase(),
|
||||
VersionTable.FEATURE_CACHE_CONTENT_METADATA,
|
||||
checkNotNull(hexUid))
|
||||
!= VersionTable.VERSION_UNSET;
|
||||
} catch (SQLiteException e) {
|
||||
throw new DatabaseIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in a new issue