Hello,
From reading the docs, I get the idea that exceptions would be sent to Sentry regardless of whether they were rescued or not(i.e the middleware would hand it off to Sentry). Is this true? If so, I'm not able to see rescued exceptions getting sent over, and I was wondering if there are certain conditions under which this wouldn't work, and what those are?
Thanks!
What do you mean by rescue? Do you mean rescue_from in Rails or just rescue in Ruby, i.e.:
begin
rescue
end
I was referring to the latter, just rescuing within Ruby.
It's impossible for us to capture an exception inside a rescue block, because it never bubbles up any further. You have two options: you can re-raise in the rescue block, or use Raven.capture_exception:
```ruby
begin
raise "Uh oh"
rescue Exception => e
Raven.capture_exception(e)
end
Good to know, thanks.
Most helpful comment
Good to know, thanks.