As proposed in https://github.com/Tinder/StateMachine/issues/9, invalid transition should cause an exception. In my opinion, current behavior (returning Invalid object) is a good solution, however users should be able to enable throwing exceptions in such cases.
As proposed in https://github.com/Tinder/StateMachine/issues/9, invalid transition should cause an exception. In my opinion, current behavior (returning
Invalid
object) is a good solution, however users should be able to enable throwing exceptions in such cases.