Method: Sentry.with_exception_captured
- Defined in:
- lib/sentry-ruby.rb
.with_exception_captured(**options, &block) ⇒ Object
Takes a block and evaluates it. If the block raised an exception, it reports the exception to Sentry and re-raises it. If the block ran without exception, it returns the evaluation result.
443 444 445 446 447 448 |
# File 'lib/sentry-ruby.rb', line 443 def with_exception_captured(**, &block) yield rescue Exception => e capture_exception(e, **) raise end |