class method
self.wrap
Ruby on Rails 7.2.3
Since v5.2.8.1Signature
self.wrap(source: "application.active_support")
Perform the work in the supplied block as an execution.
Parameters
-
sourcekey = "application.active_support"
Source
# File activesupport/lib/active_support/execution_wrapper.rb, line 86
def self.wrap(source: "application.active_support")
return yield if active?
instance = run!
begin
yield
rescue Exception => error
error_reporter&.report(error, handled: false, source: source)
raise
ensure
instance.complete!
end
end
Defined in activesupport/lib/active_support/execution_wrapper.rb line 86
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::ExecutionWrapper