修复打印不出exception的stackTrace的bug

This commit is contained in:
bryan.zhang
2018-01-20 16:48:22 +08:00
parent c14e277b04
commit 4504baa13f
2 changed files with 6 additions and 4 deletions

View File

@@ -5,7 +5,7 @@
<artifactId>liteflow</artifactId>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>
<version>1.2.19</version>
<version>1.2.20</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

View File

@@ -128,11 +128,13 @@ public class FlowExecutor {
}else {
LOG.info("[{}]:[X]skip component[{}] execution",slot.getRequestId(),component.getClass().getSimpleName());
}
}catch(Throwable t){
}catch(Exception t){
if(component.isContinueOnError()){
LOG.error("[{}]:component[{}] cause error,but flow is still go on",t,slot.getRequestId(),component.getClass().getSimpleName());
String errorMsg = MessageFormat.format("[{0}]:component[{1}] cause error,but flow is still go on", slot.getRequestId(),component.getClass().getSimpleName());
LOG.error(errorMsg,t);
}else{
LOG.error("[{}]:executor cause error",t,slot.getRequestId());
String errorMsg = MessageFormat.format("[{0}]:executor cause error",slot.getRequestId());
LOG.error(errorMsg,t);
throw t;
}
}