From 5bd2190980a5c027b7eb1ecc94836b5c8e48722a Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 26 Aug 2024 07:08:04 +0700 Subject: [PATCH] chore: Don't unnecessarily wrap IOExceptions in UncaughtExceptionInterceptor --- .../network/interceptor/UncaughtExceptionInterceptor.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/androidMain/kotlin/eu/kanade/tachiyomi/network/interceptor/UncaughtExceptionInterceptor.kt b/core/src/androidMain/kotlin/eu/kanade/tachiyomi/network/interceptor/UncaughtExceptionInterceptor.kt index 2362b78c60..1de824381b 100644 --- a/core/src/androidMain/kotlin/eu/kanade/tachiyomi/network/interceptor/UncaughtExceptionInterceptor.kt +++ b/core/src/androidMain/kotlin/eu/kanade/tachiyomi/network/interceptor/UncaughtExceptionInterceptor.kt @@ -18,7 +18,11 @@ class UncaughtExceptionInterceptor : Interceptor { return try { chain.proceed(chain.request()) } catch (e: Exception) { - throw IOException(e) + if (e is IOException) { + throw e + } else { + throw IOException(e) + } } } }