Write job failure exceptions to error log

This commit is contained in:
arkon
2022-01-26 22:21:01 -05:00
parent 18ef5c6ff9
commit 1b71e4cee7
4 changed files with 11 additions and 1 deletions

View File

@@ -15,8 +15,10 @@ import eu.kanade.tachiyomi.data.notification.NotificationReceiver
import eu.kanade.tachiyomi.data.notification.Notifications
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.extension.api.ExtensionGithubApi
import eu.kanade.tachiyomi.util.system.logcat
import eu.kanade.tachiyomi.util.system.notification
import kotlinx.coroutines.coroutineScope
import logcat.LogPriority
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.util.concurrent.TimeUnit
@@ -28,6 +30,7 @@ class ExtensionUpdateJob(private val context: Context, workerParams: WorkerParam
val pendingUpdates = try {
ExtensionGithubApi().checkForUpdates(context)
} catch (e: Exception) {
logcat(LogPriority.ERROR, e)
return@coroutineScope Result.failure()
}