Closed pchmielowski closed 5 years ago
When a state definition is missing, exception is thrown with message: Required value is null. This fix adds more meaningful error message.
Required value is null
An example of missing state definition:
private val stateMachine = StateMachine.create<String, Int, Nothing> { initialState(STATE_A) state(STATE_A) { on(EVENT_1) { transitionTo(STATE_B) } } // Missing STATE_B definition. }
Error is thrown here:
stateMachine.transition(EVENT_1) // transition to `STATE_B` which is not handled.
When a state definition is missing, exception is thrown with message:
Required value is null
. This fix adds more meaningful error message.An example of missing state definition:
Error is thrown here: