mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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
|
@Override
|
||||||
public boolean exists() throws DatabaseIOException {
|
public boolean exists() throws DatabaseIOException {
|
||||||
return VersionTable.getVersion(
|
try {
|
||||||
databaseProvider.getReadableDatabase(),
|
return VersionTable.getVersion(
|
||||||
VersionTable.FEATURE_CACHE_CONTENT_METADATA,
|
databaseProvider.getReadableDatabase(),
|
||||||
checkNotNull(hexUid))
|
VersionTable.FEATURE_CACHE_CONTENT_METADATA,
|
||||||
!= VersionTable.VERSION_UNSET;
|
checkNotNull(hexUid))
|
||||||
|
!= VersionTable.VERSION_UNSET;
|
||||||
|
} catch (SQLiteException e) {
|
||||||
|
throw new DatabaseIOException(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue