From 7cf9b49680589e17336237bbd1b8f8de3d24afdf Mon Sep 17 00:00:00 2001 From: "everywhere.z" Date: Thu, 25 Aug 2022 13:56:12 +0800 Subject: [PATCH] =?UTF-8?q?enhancement=20#I5O22X=20=E5=A2=9E=E5=8A=A0EL?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E4=B8=AD=E7=9A=84=E6=8A=A5=E9=94=99=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../liteflow/builder/el/LiteFlowChainELBuilder.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/liteflow-core/src/main/java/com/yomahub/liteflow/builder/el/LiteFlowChainELBuilder.java b/liteflow-core/src/main/java/com/yomahub/liteflow/builder/el/LiteFlowChainELBuilder.java index 91b74c12e..65cb43bff 100644 --- a/liteflow-core/src/main/java/com/yomahub/liteflow/builder/el/LiteFlowChainELBuilder.java +++ b/liteflow-core/src/main/java/com/yomahub/liteflow/builder/el/LiteFlowChainELBuilder.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; import com.ql.util.express.DefaultContext; import com.ql.util.express.ExpressRunner; +import com.ql.util.express.exception.QLException; import com.yomahub.liteflow.builder.el.operator.*; import com.yomahub.liteflow.exception.ELParseException; import com.yomahub.liteflow.exception.FlowSystemException; @@ -61,6 +62,7 @@ public class LiteFlowChainELBuilder { expressRunner.addFunction("PRE", new PreOperator()); expressRunner.addFunction("FINALLY", new FinallyOperator()); expressRunner.addFunction("IF", new IfOperator()); + expressRunner.addFunction("ELSE", new ElseOperator()); expressRunner.addFunctionAndClassMethod("to", Object.class, new ToOperator()); expressRunner.addFunctionAndClassMethod("tag", Object.class, new TagOperator()); expressRunner.addFunctionAndClassMethod("any", Object.class, new AnyOperator()); @@ -119,10 +121,9 @@ public class LiteFlowChainELBuilder { //把主要的condition加入 this.conditionList.add(condition); return this; + }catch (QLException e){ + throw new ELParseException(e.getCause().getMessage()); }catch (Exception e){ - for (String scriptErrorMsg : errorList){ - LOG.error("\n{}", scriptErrorMsg); - } throw new ELParseException(e.getMessage()); } }