Skip to content

Commit

Permalink
Update incorrect rescue_from example in README
Browse files Browse the repository at this point in the history
Since `rescue_from` only rescues `StandardError` exceptions, rescuing `NotImplementedError` will have no effect as it is a `ScriptError` instead of `StandardError`.
  • Loading branch information
Jelkster committed Dec 31, 2017
1 parent 819c663 commit 5b4c240
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2177,8 +2177,8 @@ class Twitter::API < Grape::API
error!("ArgumentError: #{e.message}")
end

rescue_from NotImplementedError do |e|
error!("NotImplementedError: #{e.message}")
rescue_from NoMethodError do |e|
error!("NoMethodError: #{e.message}")
end
end
```
Expand Down

0 comments on commit 5b4c240

Please sign in to comment.