diff options
Diffstat (limited to 'internal/fsm.go')
| -rw-r--r-- | internal/fsm.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/fsm.go b/internal/fsm.go index 1bcc479..0b9ad1e 100644 --- a/internal/fsm.go +++ b/internal/fsm.go @@ -206,3 +206,21 @@ func (fsm *FSM) generateMermaidGraph() string { func (fsm *FSM) GenerateGraph() string { return fsm.generateMermaidGraph() } + +type FSMWrongStateTransitionError struct { + Got FSMStateID + Want FSMStateID +} + +func (e *FSMWrongStateTransitionError) Error() string { + return fmt.Sprintf("wrong FSM state, got: %s, want a state with a transition to: %s", e.Got.String(), e.Want.String()) +} + +type FSMWrongStateError struct { + Got FSMStateID + Want FSMStateID +} + +func (e *FSMWrongStateError) Error() string { + return fmt.Sprintf("wrong FSM state, got: %s, want: %s", e.Got.String(), e.Want.String()) +} |
