gocardless / statesman

A statesmanlike state machine library.
https://gocardless.com/blog/statesman/
MIT License
1.79k stars 163 forks source link

Add the source location of the Guard callback to GuardFailedError #499

Closed JoeSouthan closed 1 year ago

JoeSouthan commented 1 year ago

Often it can be difficult to know which guard failed, especially if there are a lot of guards that may intersect.

Statesman::GuardFailedError: Guard on transition from: '' to '["bar"]' returned false
from /Users/joesouthan/foobar/app/state_machines/foobars.rb:98
Tabby commented 1 year ago

Possibly resolves #254