Sha256: 6cee92d835f90c6c563afb72872945851db4364ad55a19821769b7fe60c6e536

Contents?: true

Size: 551 Bytes

Versions: 30

Compression:

Stored size: 551 Bytes

Contents

# frozen_string_literal: true

require "rack/body_proxy"

module ActionDispatch
  class Executor
    def initialize(app, executor)
      @app, @executor = app, executor
    end

    def call(env)
      state = @executor.run!(reset: true)
      begin
        response = @app.call(env)
        returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
      rescue => error
        @executor.error_reporter.report(error, handled: false)
        raise
      ensure
        state.complete! unless returned
      end
    end
  end
end

Version data entries

30 entries across 28 versions & 4 rubygems

Version Path
actionpack-7.0.4.3 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.4.2 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.4.1 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.4 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.3.1 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.3 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.2.4 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.2.3 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.2.2 lib/action_dispatch/middleware/executor.rb
actionpack-7.0.2.1 lib/action_dispatch/middleware/executor.rb