intridea/grape — pull request #452 by robertopedroso (2013-08-06 22:33:21+00:00)
Title: Specify rescue handlers and error formatters using a hash

As requested in [#450](https://github.com/intridea/grape/pull/450), this PR adds the `with` syntax to `rescue_from` and `error_formatter`:

````ruby
rescue_from ArgumentError, with: rescue_argument_error
error_formatter :custom, with: CustomFormatter
````

But retains backwards-compatibility:

````ruby
rescue_from ArgumentError do |e|
...
end

error_formatter :custom, lambda {|...| ... }
````