优化:表达式求值失败的提示信息

pull/2294/MERGE
ChenX 1 year ago
parent f7849e3493
commit f849181da2

@ -505,13 +505,13 @@ export class TemplateParamDetail extends React.Component<{}> {
let result = CheckExpr(par.expr as string, paramDefine);
if (result.error !== undefined)//执行出错 反馈error
{
app.Editor.Prompt("表达式求值失败:" + result.error, LogType.Error);
app.Editor.Prompt(`模块变量:${par.name},表达式:${par.expr}的表达式求值失败!` + result.error, LogType.Error);
return false;
}
else
if (typeof (result.res) !== "number")//不是数字 表达式无效
{
app.Editor.Prompt("无效表达式", LogType.Error);
app.Editor.Prompt(`模块变量:${par.name},表达式:${par.expr},无效表达式!` + result.error, LogType.Error);
return false;
}
else

Loading…
Cancel
Save