mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-01 06:47:56 +01:00
Make some error messages localizable (#9811)
* Make error message of 3 exceptions localizable. * Revert unnecessary file handle exception change.
This commit is contained in:
@@ -106,10 +106,10 @@ class BackupManager(
|
||||
UniFile.fromUri(context, uri)
|
||||
}
|
||||
)
|
||||
?: throw Exception("Couldn't create backup file")
|
||||
?: throw Exception(context.getString(R.string.create_backup_file_error))
|
||||
|
||||
if (!file.isFile) {
|
||||
throw IllegalStateException("Failed to get handle on file")
|
||||
throw IllegalStateException("Failed to get handle on a backup file")
|
||||
}
|
||||
|
||||
val byteArray = parser.encodeToByteArray(BackupSerializer, backup)
|
||||
|
||||
Reference in New Issue
Block a user