Fix logging message when transition action throws exception

This commit is contained in:
Pinguet62
2017-09-17 22:31:26 +02:00
parent 0f41e76ed9
commit 5630769f04
2 changed files with 2 additions and 2 deletions

View File

@@ -287,7 +287,7 @@ public abstract class AbstractStateMachine<S, E> extends StateMachineObjectSuppo
} catch (Exception e) {
// aborting, executor should stop possible loop checking possible transitions
// causing infinite execution
log.warn("Aborting as transition " + t + " caused error " + e);
log.warn("Aborting as transition " + t, e);
throw new StateMachineException("Aborting as transition " + t + " caused error ", e);
}
notifyTransition(buildStateContext(Stage.TRANSITION, message, t, getRelayStateMachine()));

View File

@@ -240,7 +240,7 @@ public class DefaultStateMachineExecutor<S, E> extends LifecycleObjectSupport im
try {
transit = t.transit(stateContext);
} catch (Exception e) {
log.warn("Aborting as transition " + t + " caused error " + e);
log.warn("Aborting as transition " + t, e);
}
if (transit) {
// if executor transit is raising exception, stop here