From 508d9d7cfb4ad7ae472a08858ccd6f6017c7330e Mon Sep 17 00:00:00 2001 From: Hoky <303455184@qq.com> Date: Wed, 18 Aug 2021 13:46:28 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-54887=20=E5=85=AC=E5=BC=8F=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E4=BC=98=E5=8C=96=E4=B8=80=E6=9C=9F=201.?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=BA=9B=E8=A7=84=E8=8C=83=EF=BC=9B?= =?UTF-8?q?=202.=E8=A1=A5=E5=85=85condition=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/formula/FormulaPane.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java index d2756c28f..495a91de2 100644 --- a/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java +++ b/designer-base/src/main/java/com/fr/design/formula/FormulaPane.java @@ -38,6 +38,7 @@ import com.fr.report.core.namespace.SimpleCellValueNameSpace; import com.fr.script.Calculator; import com.fr.script.ScriptConstants; import com.fr.script.checker.FunctionCheckerDispatcher; +import com.fr.script.checker.exception.ConditionCheckWrongException; import com.fr.script.checker.exception.FunctionCheckWrongException; import com.fr.script.rules.FunctionParameterType; import com.fr.script.rules.FunctionRule; @@ -663,6 +664,11 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula { return FunctionCheckerDispatcher.getInstance() .getFunctionChecker(node) .checkFunction(node) ? VALID_FORMULA : INVALID_FORMULA; + } catch (ConditionCheckWrongException cce) { + List rules = cce.getRules(); + String functionName = cce.getFunctionName(); + StringBuilder errorMsg = new StringBuilder(functionName + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula_Check_Condition_Tips") + ":"); + return errorMsg.toString(); } catch (FunctionCheckWrongException ce) { List rules = ce.getRules(); String functionName = ce.getFunctionName();