Fix logging message when transition action throws exception

- Backport #413
- Relates #307
This commit is contained in:
Pinguet62
2017-09-17 22:31:26 +02:00
committed by Janne Valkealahti
parent 5da12bec59
commit fb8d534e8e
2 changed files with 2 additions and 2 deletions

View File

@@ -294,7 +294,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

@@ -243,7 +243,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