BlogTruyen: Wrap async call in try-catch (#5526)

add try catch
This commit is contained in:
bapeey 2024-10-15 01:59:50 -05:00 committed by Draff
parent e91a347360
commit 1767c5a29d
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 7 additions and 2 deletions

View File

@ -2,4 +2,4 @@ plugins {
id("lib-multisrc") id("lib-multisrc")
} }
baseVersionCode = 2 baseVersionCode = 3

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.multisrc.blogtruyen package eu.kanade.tachiyomi.multisrc.blogtruyen
import android.util.Log
import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.Filter
@ -366,7 +367,11 @@ abstract class BlogTruyen(
) )
Single.fromCallable { Single.fromCallable {
client.newCall(request).execute().close() try {
client.newCall(request).execute().close()
} catch (e: Exception) {
Log.e("BlogTruyen", "Error updating view count", e)
}
} }
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(Schedulers.io()) .observeOn(Schedulers.io())