Sha256: 0162fce716bf9fa293ced04b00edc0378cc37bea1d23b7d6f25299e342ce5c98

Contents?: true

Size: 395 Bytes

Versions: 2

Compression:

Stored size: 395 Bytes

Contents

class Flail
  class Rack
    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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flail-0.1.6 lib/flail/rack.rb
flail-0.1.5 lib/flail/rack.rb