mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 13:51:50 +01:00
Group 'Source not installed' cases in library update error log (#5589)
This commit is contained in:
parent
6ba779fb7a
commit
88619145d8
@ -316,6 +316,9 @@ class LibraryUpdateService(
|
|||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
val errorMessage = if (e is NoChaptersException) {
|
val errorMessage = if (e is NoChaptersException) {
|
||||||
getString(R.string.no_chapters_error)
|
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 {
|
} else {
|
||||||
e.message
|
e.message
|
||||||
}
|
}
|
||||||
|
@ -70,8 +70,11 @@ open class SourceManager(private val context: Context) {
|
|||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSourceNotInstalledException(): Exception {
|
private fun getSourceNotInstalledException(): SourceNotInstalledException {
|
||||||
return Exception(context.getString(R.string.source_not_installed, id.toString()))
|
return SourceNotInstalledException(id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inner class SourceNotInstalledException(val id: Long) :
|
||||||
|
Exception(context.getString(R.string.source_not_installed, id.toString()))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user