class ActiveSupport::ExecutionWrapper

def self.wrap

Perform the work in the supplied block as an execution.
def self.wrap
  return yield if active?
  instance = run!
  begin
    yield
  rescue => error
    error_reporter.report(error, handled: false)
    raise
  ensure
    instance.complete!
  end
end