Skip to content

Commit

Permalink
document error callback behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
stiff committed Feb 21, 2013
1 parent 24a4778 commit 22df5d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -88,6 +88,9 @@ class Job
after do
...
end
error do |e|
...
end
transitions :from => :running, :to => :sleeping
end
end
Expand Down Expand Up @@ -132,6 +135,8 @@ Also, you can pass parameters to events:

In this case the `set_process` would be called with `:defagmentation` argument.

In case an error occurred during event it is `rescue`d and passed to `:error` callback, which can handle it or re`raise`.

### Guards

Let's assume you want to allow particular transitions only if a defined condition is
Expand Down

0 comments on commit 22df5d1

Please sign in to comment.