Deprecate throwable logging function, produces bad log

This commit is contained in:
Jobobby04
2021-03-08 19:50:41 -05:00
parent 984956ce95
commit ccdae6bb9a
6 changed files with 12 additions and 9 deletions
@@ -150,7 +150,7 @@ class ApiMangaParser(private val lang: String) {
if (tags.isNotEmpty()) tags.clear()
tags += genres.map { RaisedTag(null, it, MangaDexSearchMetadata.TAG_TYPE_DEFAULT) }
} catch (e: Exception) {
xLogE(e)
xLogE("Parse into metadata error", e)
throw e
}
}
@@ -250,13 +250,9 @@ class ApiMangaParser(private val lang: String) {
fun chapterParseForMangaId(response: Response): Int {
try {
if (response.code != 200) throw Exception("HTTP error ${response.code}")
checkNotNull(response.body) {
"Null Response"
}
return response.parseAs<ApiChapterSerializer>().data.mangaId
} catch (e: Exception) {
xLogE(e)
xLogE("Parse for manga id error", e)
throw e
}
}
@@ -135,7 +135,7 @@ class SimilarUpdateService(
// Unsubscribe from any previous subscription if needed.
job?.cancel()
val handler = CoroutineExceptionHandler { _, exception ->
xLogE(exception)
xLogE("Similar manga update error", exception)
stopSelf(startId)
showResultNotification(true)
cancelProgressNotification()