summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-03-20 12:59:50 +0100
committerJeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com>2023-09-25 09:43:37 +0200
commit8611e30ce22b1377efdb1e5b9528678a1098edeb (patch)
treeaa5f757e005725f925046309b8707beba90e7d9b /internal
parent933d042ad2572edd156fa2ec51b2ed7b347eebec (diff)
FSM: Add state name to transition error
Diffstat (limited to 'internal')
-rw-r--r--internal/fsm/fsm.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fsm/fsm.go b/internal/fsm/fsm.go
index 84b5f1b..09712d3 100644
--- a/internal/fsm/fsm.go
+++ b/internal/fsm/fsm.go
@@ -132,7 +132,7 @@ func (fsm *FSM) writeGraph() {
func (fsm *FSM) GoTransitionRequired(newState StateID, data interface{}) error {
oldState := fsm.Current
if !fsm.GoTransitionWithData(newState, data) {
- return errors.Errorf("fsm failed transition from '%v' to '%v'", oldState, newState)
+ return errors.Errorf("fsm failed transition from '%v' to '%v'", fsm.GetStateName(oldState), fsm.GetStateName(newState))
}
return nil
}