mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
enhancement #I5P263 脚本执行异常,出现异常的处理
This commit is contained in:
@@ -51,7 +51,7 @@ public class JavaScriptExecutor implements ScriptExecutor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object execute(ScriptExecuteWrap wrap) {
|
||||
public Object execute(ScriptExecuteWrap wrap) throws Exception{
|
||||
try{
|
||||
if (!compiledScriptMap.containsKey(wrap.getNodeId())){
|
||||
String errorMsg = StrUtil.format("script for node[{}] is not loaded", wrap.getNodeId());
|
||||
@@ -92,8 +92,7 @@ public class JavaScriptExecutor implements ScriptExecutor {
|
||||
return compiledScript.eval(bindings);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
String errorMsg = StrUtil.format("script execute error for node[{}]", wrap.getNodeId());
|
||||
throw new ScriptExecuteException(errorMsg);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user