Package io.hektor.fsm.builder.exceptions
Class TransientLoopDetectedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.hektor.fsm.builder.exceptions.FSMBuilderException
io.hektor.fsm.builder.exceptions.StateBuilderException
io.hektor.fsm.builder.exceptions.TransientLoopDetectedException
- All Implemented Interfaces:
Serializable
If you would be able to specify a transition from a transient state to another transient state (or itself)
you will likely end up in a loop. When the FSM is being built, this scenario is checked and if detected
this exception will be thrown.
Note: if you were to have an action along with the transition then I guess you could mutate some internal
state variable and as such break the loop but that is too hard to guarantee so for now we will simply
just not allow it. That includes a transient state A having a transition to another transient state B.
In this last case one could argue unless the transient state B then loops back to A we should allow it, but again,
too complicated to keep track of and I wonder if there is a real need for it. If it is, we'll revisit.
- Author:
- jonas@jonasborjesson.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class io.hektor.fsm.builder.exceptions.FSMBuilderException
FSMBuilderException.ErrorCode -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.hektor.fsm.builder.exceptions.StateBuilderException
getStateMethods inherited from class io.hektor.fsm.builder.exceptions.FSMBuilderException
getErrorCodeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TransientLoopDetectedException
-