From 4504baa13fa4362750f3582993f8104cdc936fcc Mon Sep 17 00:00:00 2001 From: "bryan.zhang" Date: Sat, 20 Jan 2018 16:48:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8D=B0=E4=B8=8D?= =?UTF-8?q?=E5=87=BAexception=E7=9A=84stackTrace=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../java/com/thebeastshop/liteflow/core/FlowExecutor.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0960a12d0..0ed5aa39e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ liteflow jar 4.0.0 - 1.2.19 + 1.2.20 UTF-8 diff --git a/src/main/java/com/thebeastshop/liteflow/core/FlowExecutor.java b/src/main/java/com/thebeastshop/liteflow/core/FlowExecutor.java index 0160c2dff..87d73276b 100644 --- a/src/main/java/com/thebeastshop/liteflow/core/FlowExecutor.java +++ b/src/main/java/com/thebeastshop/liteflow/core/FlowExecutor.java @@ -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; } }