Minor exception message cleanup

This commit is contained in:
arkon
2023-12-28 16:33:54 -05:00
parent f0710df356
commit 8b65fd5751
3 changed files with 4 additions and 5 deletions

View File

@@ -73,10 +73,9 @@ class BackupCreator(
UniFile.fromUri(context, uri)
}
)
?: throw Exception(context.stringResource(MR.strings.create_backup_file_error))
if (!file.isFile) {
throw IllegalStateException("Failed to get handle on a backup file")
if (file == null || !file.isFile) {
throw IllegalStateException(context.stringResource(MR.strings.create_backup_file_error))
}
val databaseManga = getFavorites.await()