You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
3
3
#### Features
4
4
5
-
*[#1754](https://github.com/ruby-grape/grape/pull/1754): Added `rescue_from :exception` to truly rescue from all exceptions - [@jelkster](https://github.com/jelkster).
6
5
* Your contribution here.
7
6
8
7
#### Fixes
@@ -12,6 +11,7 @@
12
11
*[#1749](https://github.com/ruby-grape/grape/pull/1749): Allow rescue from non-`StandardError` exceptions - [@dm1try](https://github.com/dm1try).
13
12
*[#1750](https://github.com/ruby-grape/grape/pull/1750): Fix a circular dependency warning due to router being loaded by API - [@salasrod](https://github.com/salasrod).
14
13
*[#1752](https://github.com/ruby-grape/grape/pull/1752): Fix `include_missing` behavior for aliased parameters - [@jonasoberschweiber](https://github.com/jonasoberschweiber).
14
+
*[#1754](https://github.com/ruby-grape/grape/pull/1754): Allow rescue from non-`StandardError` exceptions to use default error handling - [@jelkster](https://github.com/jelkster).
Copy file name to clipboardExpand all lines: README.md
-8
Original file line number
Diff line number
Diff line change
@@ -2083,14 +2083,6 @@ end
2083
2083
This mimics [default `rescue` behaviour](https://ruby-doc.org/core/StandardError.html) when an exception type is not provided.
2084
2084
Any other exception should be rescued explicitly, see [below](#exceptions-that-should-be-rescued-explicitly).
2085
2085
2086
-
In the event you want to truly rescue all exceptions, this can be done.
2087
-
2088
-
```ruby
2089
-
classTwitter::API < Grape::API
2090
-
rescue_from :exception
2091
-
end
2092
-
```
2093
-
2094
2086
Grape can also rescue from all exceptions and still use the built-in exception handing.
2095
2087
This will give the same behavior as `rescue_from :all` with the addition that Grape will use the exception handling defined by all Exception classes that inherit `Grape::Exceptions::Base`.
0 commit comments