From f3a2f566c8a09ab862758ae69b43da2a2cd8f1db Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Sat, 19 Oct 2024 22:43:05 +0600 Subject: [PATCH] Pass uncaught exception to default handler in GlobalExceptionHandler Fixes #1347 --- .../kanade/tachiyomi/crash/GlobalExceptionHandler.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt b/app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt index 600dac444..cb08371b2 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/crash/GlobalExceptionHandler.kt @@ -11,7 +11,6 @@ import kotlinx.serialization.encoding.Encoder import kotlinx.serialization.json.Json import logcat.LogPriority import tachiyomi.core.common.util.system.logcat -import kotlin.system.exitProcess class GlobalExceptionHandler private constructor( private val applicationContext: Context, @@ -31,13 +30,9 @@ class GlobalExceptionHandler private constructor( } override fun uncaughtException(thread: Thread, exception: Throwable) { - try { - logcat(priority = LogPriority.ERROR, throwable = exception) - launchActivity(applicationContext, activityToBeLaunched, exception) - exitProcess(0) - } catch (_: Exception) { - defaultHandler.uncaughtException(thread, exception) - } + logcat(priority = LogPriority.ERROR, throwable = exception) + launchActivity(applicationContext, activityToBeLaunched, exception) + defaultHandler.uncaughtException(thread, exception) } private fun launchActivity(