Group 'Source not installed' cases in library update error log (#5589)
(cherry picked from commit 88619145d816fdd3248b5c071bdd8059ab3219cb) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/source/SourceManager.kt
This commit is contained in:
parent
641ad196f9
commit
25629b5a4c
@ -398,6 +398,9 @@ class LibraryUpdateService(
|
||||
} catch (e: Throwable) {
|
||||
val errorMessage = if (e is NoChaptersException) {
|
||||
getString(R.string.no_chapters_error)
|
||||
} else if (e is SourceManager.SourceNotInstalledException) {
|
||||
// failedUpdates will already have the source, don't need to copy it into the message
|
||||
getString(R.string.loader_not_implemented_error)
|
||||
} else {
|
||||
e.message
|
||||
}
|
||||
|
@ -183,11 +183,14 @@ open class SourceManager(private val context: Context) {
|
||||
return name
|
||||
}
|
||||
|
||||
private fun getSourceNotInstalledException(): Exception {
|
||||
return Exception(context.getString(R.string.source_not_installed, id.toString()))
|
||||
private fun getSourceNotInstalledException(): SourceNotInstalledException {
|
||||
return SourceNotInstalledException(id)
|
||||
}
|
||||
}
|
||||
|
||||
inner class SourceNotInstalledException(val id: Long) :
|
||||
Exception(context.getString(R.string.source_not_installed, id.toString()))
|
||||
|
||||
// SY -->
|
||||
companion object {
|
||||
private const val fillInSourceId = Long.MAX_VALUE
|
||||
|
Loading…
x
Reference in New Issue
Block a user