Skip to content

Commit 5b4c240

Browse files
committed
Update incorrect rescue_from example in README
Since `rescue_from` only rescues `StandardError` exceptions, rescuing `NotImplementedError` will have no effect as it is a `ScriptError` instead of `StandardError`.
1 parent 819c663 commit 5b4c240

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,8 +2177,8 @@ class Twitter::API < Grape::API
21772177
error!("ArgumentError: #{e.message}")
21782178
end
21792179

2180-
rescue_from NotImplementedError do |e|
2181-
error!("NotImplementedError: #{e.message}")
2180+
rescue_from NoMethodError do |e|
2181+
error!("NoMethodError: #{e.message}")
21822182
end
21832183
end
21842184
```

0 commit comments

Comments
 (0)