From 1814b3b22c3c24f781493228d85b9eb33be4cacb Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 28 Mar 2023 18:16:26 -0400 Subject: [PATCH] Don't unnecessarily wrap IOExceptions in UncaughtExceptionInterceptor --- .../network/interceptor/UncaughtExceptionInterceptor.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/eu/kanade/tachiyomi/network/interceptor/UncaughtExceptionInterceptor.kt b/core/src/main/java/eu/kanade/tachiyomi/network/interceptor/UncaughtExceptionInterceptor.kt index 2362b78c60..1de824381b 100644 --- a/core/src/main/java/eu/kanade/tachiyomi/network/interceptor/UncaughtExceptionInterceptor.kt +++ b/core/src/main/java/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) + } } } }