mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
update fork / build (push) Has been cancelled
Update Cronet / build (push) Has been cancelled
Some checks failed
Test Build / prepare (push) Has been cancelled
Test Build / build (app, release) (push) Has been cancelled
Test Build / build (app, releaseA) (push) Has been cancelled
Test Build / prerelease (push) Has been cancelled
Test Build / lanzou (push) Has been cancelled
Test Build / test_Branch (push) Has been cancelled
Test Build / telegram (push) Has been cancelled
update fork / build (push) Has been cancelled
Update Cronet / build (push) Has been cancelled
This commit is contained in:
@@ -102,6 +102,7 @@ interface JsExtensions : JsEncodeUtils {
|
||||
return kotlin.runCatching {
|
||||
analyzeUrl.getStrResponse().body
|
||||
}.onFailure {
|
||||
rhinoContext.ensureActive()
|
||||
AppLog.put("ajax(${urlStr}) error\n${it.localizedMessage}", it)
|
||||
}.getOrElse {
|
||||
it.stackTraceStr
|
||||
@@ -136,6 +137,7 @@ interface JsExtensions : JsEncodeUtils {
|
||||
return kotlin.runCatching {
|
||||
analyzeUrl.getStrResponse()
|
||||
}.onFailure {
|
||||
rhinoContext.ensureActive()
|
||||
AppLog.put("connect(${urlStr}) error\n${it.localizedMessage}", it)
|
||||
}.getOrElse {
|
||||
StrResponse(analyzeUrl.url, it.stackTraceStr)
|
||||
@@ -153,6 +155,7 @@ interface JsExtensions : JsEncodeUtils {
|
||||
return kotlin.runCatching {
|
||||
analyzeUrl.getStrResponse()
|
||||
}.onFailure {
|
||||
rhinoContext.ensureActive()
|
||||
AppLog.put("ajax($urlStr,$header) error\n${it.localizedMessage}", it)
|
||||
}.getOrElse {
|
||||
StrResponse(analyzeUrl.url, it.stackTraceStr)
|
||||
|
||||
@@ -25,6 +25,7 @@ import io.legado.app.utils.isJson
|
||||
import io.legado.app.utils.printOnDebug
|
||||
import io.legado.app.utils.splitNotBlank
|
||||
import io.legado.app.utils.stackTraceStr
|
||||
import kotlinx.coroutines.ensureActive
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlinx.coroutines.withTimeout
|
||||
import org.apache.commons.text.StringEscapeUtils
|
||||
@@ -794,6 +795,7 @@ class AnalyzeRule(
|
||||
return kotlin.runCatching {
|
||||
analyzeUrl.getStrResponse().body
|
||||
}.onFailure {
|
||||
coroutineContext.ensureActive()
|
||||
log("ajax(${urlStr}) error\n${it.stackTraceToString()}")
|
||||
it.printOnDebug()
|
||||
}.getOrElse {
|
||||
|
||||
Reference in New Issue
Block a user