-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rescue truly all exceptions #1745
base: master
Are you sure you want to change the base?
Conversation
Thanks. A few things need to happen to merge this change:
|
Thank you for the reviewing!
I think |
Actually, I always thought that # :(
rescue_from do
...
end and read
So I suggest fixing this first and add to README that Otherwise, the original intention of providing special exceptions like P.S. truly explicitness => deprecate |
Makes sense @dm1try. Thanks. I'm still looking for a mergeable PR, see my comments above. |
Rebase against #1749. |
What should we do with this @mtsmfm? |
Sorry for being late 🙇 |
Fix #1713
Currently,
rescue_from
can't rescue from exceptions which aren't inherited fromStandardError
.Due to this constraint, we can't rescue exceptions which are inherited from
Exception
.Some exceptions are inherited from
Exception
because they should be rescued explicitly. (ex.Rack::Timeout::RequestTimeoutException
)Before v0.6.0, it can rescue truly all exceptions but unintentionally it changed because of rubocop.
I think grape should be able to rescue from all exceptions like Rails.
Perhaps it'll affect a lot but I think current users assume
rescue_from :all
can rescue from truly all exceptions.What do you think?