DMZJ: add error message (#16579)
This commit is contained in:
parent
573eb96799
commit
ef6318301b
|
@ -6,7 +6,7 @@ ext {
|
|||
extName = 'DMZJ'
|
||||
pkgNameSuffix = 'zh.dmzj'
|
||||
extClass = '.Dmzj'
|
||||
extVersionCode = 39
|
||||
extVersionCode = 40
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
||||
|
|
|
@ -26,7 +26,11 @@ object ApiV3 {
|
|||
|
||||
fun mangaInfoUrlV1(id: String) = "$apiUrl/dynamic/comicinfo/$id.json"
|
||||
|
||||
private fun parseMangaInfoV1(response: Response): ResponseDto = response.parseAs()
|
||||
private fun parseMangaInfoV1(response: Response): ResponseDto = try {
|
||||
response.parseAs()
|
||||
} catch (_: Throwable) {
|
||||
throw Exception("获取漫画信息失败")
|
||||
}
|
||||
|
||||
fun parseMangaDetailsV1(response: Response): SManga {
|
||||
return parseMangaInfoV1(response).data.info.toSManga()
|
||||
|
|
Loading…
Reference in New Issue