Tinder / StateMachine

A Kotlin and Swift DSL for finite state machine
Other
1.96k stars 128 forks source link

Add parameter to enable throwing exception on invalid transition #16

Closed pchmielowski closed 3 years ago

pchmielowski commented 5 years ago

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.