
Hi Christophe Sorry for the late answer.
Is it possible to transit<> back to the source state when an exception is thrown by the handler of a transition ? Pls, note that the handler of the transition can be used by several transitions in the state diagram.
The state machine, being in a transition, is between two stable states. The exception can be handled by the innermost common outer state (or anyone above). In an handler of this state, is it possible to force transit<> to the source state of the transition that throws the exception ? Or is it possible to manage it differently ?
Yes, in the exception event handler, transition to an error state, which posts an event (say EvGoBack) in its entry action. The error state has a transition triggered by EvGoBack to deep history. For this to work, all possible source states must be direct or indirect inner states of a common outer state and the transition to history would specify a direct inner state of the common outer state as the default. Also, the error state must not be an inner state of the common outer state. HTH, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.