mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
bug #I631ZF groovy脚本接入时,自定义异常抛出后被组件失败异常覆盖
This commit is contained in:
@@ -100,7 +100,6 @@ public class GraalJavaScriptExecutor implements ScriptExecutor {
|
||||
}
|
||||
return value;
|
||||
} catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.yomahub.liteflow.exception.LiteFlowException;
|
||||
import com.yomahub.liteflow.script.ScriptBeanManager;
|
||||
import com.yomahub.liteflow.script.ScriptExecuteWrap;
|
||||
import com.yomahub.liteflow.slot.DataBus;
|
||||
@@ -92,8 +93,11 @@ public class GroovyScriptExecutor implements ScriptExecutor {
|
||||
|
||||
return compiledScript.eval(bindings);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
throw e;
|
||||
if (ObjectUtil.isNotNull(e.getCause()) && e.getCause() instanceof LiteFlowException){
|
||||
throw (LiteFlowException)e.getCause();
|
||||
}else{
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,6 @@ public class JavaScriptExecutor implements ScriptExecutor {
|
||||
|
||||
return compiledScript.eval(bindings);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user