Throw IOException

This commit is contained in:
Jobobby04 2024-03-02 14:25:31 -05:00 committed by Cuong M. Tran
parent 2b174019af
commit 471c8c9909
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

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
}