Sha256: 1e36b08d90b018e3f621239cc1abc59d3ea722df48f13205109f721201d34ad9

Contents?: true

Size: 393 Bytes

Versions: 11

Compression:

Stored size: 393 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

11 entries across 11 versions & 1 rubygems

Version Path
flail-0.1.4 lib/flail/rack.rb
flail-0.1.3 lib/flail/rack.rb
flail-0.1.2 lib/flail/rack.rb
flail-0.1.1 lib/flail/rack.rb
flail-0.1.0 lib/flail/rack.rb
flail-0.0.7 lib/flail/rack.rb
flail-0.0.6 lib/flail/rack.rb
flail-0.0.5 lib/flail/rack.rb
flail-0.0.4 lib/flail/rack.rb
flail-0.0.3 lib/flail/rack.rb
flail-0.0.2 lib/flail/rack.rb