diff --git a/README.md b/README.md index c1b0429a..4b7845cb 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,9 @@ class Job after do ... end + error do |e| + ... + end transitions :from => :running, :to => :sleeping end end @@ -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