Minor exception message cleanup
Cette révision appartient à :
Parent
f0710df356
révision
8b65fd5751
3 fichiers modifiés avec 4 ajouts et 5 suppressions
|
@ -73,10 +73,9 @@ class BackupCreator(
|
||||||
UniFile.fromUri(context, uri)
|
UniFile.fromUri(context, uri)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
?: throw Exception(context.stringResource(MR.strings.create_backup_file_error))
|
|
||||||
|
|
||||||
if (!file.isFile) {
|
if (file == null || !file.isFile) {
|
||||||
throw IllegalStateException("Failed to get handle on a backup file")
|
throw IllegalStateException(context.stringResource(MR.strings.create_backup_file_error))
|
||||||
}
|
}
|
||||||
|
|
||||||
val databaseManga = getFavorites.await()
|
val databaseManga = getFavorites.await()
|
||||||
|
|
|
@ -304,7 +304,7 @@ internal object ExtensionLoader {
|
||||||
when (val obj = Class.forName(it, false, classLoader).getDeclaredConstructor().newInstance()) {
|
when (val obj = Class.forName(it, false, classLoader).getDeclaredConstructor().newInstance()) {
|
||||||
is Source -> listOf(obj)
|
is Source -> listOf(obj)
|
||||||
is SourceFactory -> obj.createSources()
|
is SourceFactory -> obj.createSources()
|
||||||
else -> throw Exception("Unknown source class type! ${obj.javaClass}")
|
else -> throw Exception("Unknown source class type: ${obj.javaClass}")
|
||||||
}
|
}
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
logcat(LogPriority.ERROR, e) { "Extension load error: $extName ($it)" }
|
logcat(LogPriority.ERROR, e) { "Extension load error: $extName ($it)" }
|
||||||
|
|
|
@ -473,4 +473,4 @@ abstract class HttpSource : CatalogueSource {
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
}
|
}
|
||||||
|
|
||||||
class LicensedMangaChaptersException : Exception("Licensed - No chapters to show")
|
class LicensedMangaChaptersException : RuntimeException()
|
||||||
|
|
Référencer dans un nouveau ticket