From 69401f70cbb92f821b3a09c1bd6cfb7998cae330 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 12 Sep 2020 20:09:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../legado/app/model/analyzeRule/AnalyzeRule.kt | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt index b83a3e730..fc656d183 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt @@ -589,17 +589,12 @@ class AnalyzeRule(var book: BaseBook? = null) : JsExtensions { * 执行JS */ private fun evalJS(jsStr: String, result: Any?): Any? { - try { - val bindings = SimpleBindings() - bindings["java"] = this - bindings["book"] = book - bindings["result"] = result - bindings["baseUrl"] = baseUrl - return SCRIPT_ENGINE.eval(jsStr, bindings) - } catch (e: Exception) { - e.printStackTrace() - throw e - } + val bindings = SimpleBindings() + bindings["java"] = this + bindings["book"] = book + bindings["result"] = result + bindings["baseUrl"] = baseUrl + return SCRIPT_ENGINE.eval(jsStr, bindings) } /**