enhancement #I5ULVA 修正不规范的问题,chain的name和id混用,不太严谨

This commit is contained in:
everywhere.z 2022-11-06 13:12:59 +08:00
parent 97b17095fe
commit 513e532687
7 changed files with 8 additions and 9 deletions

View File

@ -12,7 +12,7 @@ public class ScriptBreakComponent extends NodeBreakComponent implements ScriptCo
@Override
public boolean processBreak() throws Exception {
ScriptExecuteWrap wrap = new ScriptExecuteWrap();
wrap.setCurrChainName(this.getCurrChainName());
wrap.setCurrChainId(this.getCurrChainId());
wrap.setNodeId(this.getNodeId());
wrap.setSlotIndex(this.getSlotIndex());
wrap.setTag(this.getTag());

View File

@ -17,7 +17,7 @@ public class ScriptCommonComponent extends NodeComponent implements ScriptCompon
@Override
public void process() throws Exception {
ScriptExecuteWrap wrap = new ScriptExecuteWrap();
wrap.setCurrChainName(this.getCurrChainName());
wrap.setCurrChainId(this.getCurrChainId());
wrap.setNodeId(this.getNodeId());
wrap.setSlotIndex(this.getSlotIndex());
wrap.setTag(this.getTag());

View File

@ -12,7 +12,7 @@ public class ScriptForComponent extends NodeForComponent implements ScriptCompon
@Override
public int processFor() throws Exception {
ScriptExecuteWrap wrap = new ScriptExecuteWrap();
wrap.setCurrChainName(this.getCurrChainName());
wrap.setCurrChainId(this.getCurrChainId());
wrap.setNodeId(this.getNodeId());
wrap.setSlotIndex(this.getSlotIndex());
wrap.setTag(this.getTag());

View File

@ -12,7 +12,7 @@ public class ScriptIfComponent extends NodeIfComponent implements ScriptComponen
@Override
public boolean processIf() throws Exception {
ScriptExecuteWrap wrap = new ScriptExecuteWrap();
wrap.setCurrChainName(this.getCurrChainName());
wrap.setCurrChainId(this.getCurrChainId());
wrap.setNodeId(this.getNodeId());
wrap.setSlotIndex(this.getSlotIndex());
wrap.setTag(this.getTag());

View File

@ -13,7 +13,7 @@ public class ScriptSwitchComponent extends NodeSwitchComponent implements Script
@Override
public String processSwitch() throws Exception {
ScriptExecuteWrap wrap = new ScriptExecuteWrap();
wrap.setCurrChainName(this.getCurrChainName());
wrap.setCurrChainId(this.getCurrChainId());
wrap.setNodeId(this.getNodeId());
wrap.setSlotIndex(this.getSlotIndex());
wrap.setTag(this.getTag());

View File

@ -13,7 +13,7 @@ public class ScriptWhileComponent extends NodeWhileComponent implements ScriptCo
@Override
public boolean processWhile() throws Exception {
ScriptExecuteWrap wrap = new ScriptExecuteWrap();
wrap.setCurrChainName(this.getCurrChainName());
wrap.setCurrChainId(this.getCurrChainId());
wrap.setNodeId(this.getNodeId());
wrap.setSlotIndex(this.getSlotIndex());
wrap.setTag(this.getTag());

View File

@ -54,7 +54,7 @@ public class QLExpressScriptExecutor implements ScriptExecutor {
}
@Override
public Object execute(ScriptExecuteWrap wrap) {
public Object execute(ScriptExecuteWrap wrap) throws Exception{
List<String> errorList = new ArrayList<>();
try{
if (!compiledScriptMap.containsKey(wrap.getNodeId())){
@ -98,8 +98,7 @@ public class QLExpressScriptExecutor implements ScriptExecutor {
for (String scriptErrorMsg : errorList){
log.error("\n{}", scriptErrorMsg);
}
String errorMsg = StrUtil.format("script execute error for node[{}]", wrap.getNodeId());
throw new ScriptExecuteException(errorMsg);
throw e;
}
}