mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
!162 feat #I69VAR 优化 node chain 不存在时候的错误提示
Merge pull request !162 from 与或非/issues/2023012001
This commit is contained in:
@@ -237,20 +237,19 @@ public class LiteFlowChainELBuilder {
|
||||
int commaRightIndex = sourceEl.indexOf(attrName + StrUtil.COMMA);
|
||||
if (commaRightIndex != -1) {
|
||||
// 需要加上 "EL: " 的长度 4,再加上 "^" 的长度 1,indexOf 从 0 开始,所以还需要加 1
|
||||
msg = msg + sourceEl + "\n" + StrUtil.fill("^", CharUtil.SPACE, commaRightIndex + 6, true);
|
||||
return msg + sourceEl + "\n" + StrUtil.fill("^", CharUtil.SPACE, commaRightIndex + 6, true);
|
||||
}
|
||||
int commaLeftIndex = sourceEl.indexOf(StrUtil.COMMA + attrName);
|
||||
if (commaLeftIndex != -1) {
|
||||
// 需要加上 "EL: " 的长度 4,再加上 "^" 的长度 1,再加上 "," 的长度 1,indexOf 从 0 开始,所以还需要加 1
|
||||
msg = msg + sourceEl + "\n" + StrUtil.fill("^", CharUtil.SPACE, commaLeftIndex + 7, true);
|
||||
return msg + sourceEl + "\n" + StrUtil.fill("^", CharUtil.SPACE, commaLeftIndex + 7, true);
|
||||
}
|
||||
// 还有一种特殊情况,就是 EL 表达式中的节点使用 node("a")
|
||||
int nodeIndex = sourceEl.indexOf(String.format("node(\"%s\")", attrName));
|
||||
if (nodeIndex != -1) {
|
||||
// 需要加上 "EL: " 的长度 4,再加上 “node("” 长度 6,再加上 "^" 的长度 1,indexOf 从 0 开始,所以还需要加 1
|
||||
msg = msg + sourceEl + "\n" + StrUtil.fill("^", CharUtil.SPACE, commaLeftIndex + 12, true);
|
||||
return msg + sourceEl + "\n" + StrUtil.fill("^", CharUtil.SPACE, commaLeftIndex + 12, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
|
||||
Reference in New Issue
Block a user