Sha256: 6b8c0f2c2c77c99a1030a3814f88060fe2d3f4f726657470a1e7dd299e354a97

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

class Flail
  module Handlers
    class Middleware
      def initialize(app)
        @app = app
      end

      def call(env)
        begin
          response = @app.call(env)
        rescue Exception => exception
          Flail::Exception.new(env, exception).handle!
          raise
        end

        if env['rack.exception']
          Flail::Exception.new(env, env['rack.exception']).handle!
        end

        response
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flail-0.0.1 lib/flail/rack.rb