Throw IOException

This commit is contained in:
Jobobby04 2024-03-02 14:25:31 -05:00
parent c02c5aa915
commit ec32278f1a

View File

@ -26,6 +26,7 @@ import tachiyomi.core.common.util.system.logcat
import tachiyomi.domain.source.service.SourceManager
import uy.kohesive.injekt.injectLazy
import java.io.File
import java.io.IOException
/**
* A [Fetcher] that fetches page preview image for [PagePreview] object.
@ -128,7 +129,7 @@ class PagePreviewFetcher(
) ?: callFactoryLazy.value.newCall(newRequest()).await()
if (!response.isSuccessful && response.code != HTTP_NOT_MODIFIED) {
response.close()
throw Exception(response.message)
throw IOException(response.message)
}
return response
}