Sha256: 5441b80d1f0a68edf8a54a3cf7b0edfb25780847af619f25d858dee2e1fafb04

Contents?: true

Size: 339 Bytes

Versions: 40

Compression:

Stored size: 339 Bytes

Contents

module Bizside
  class ShowExceptions

    BIZSIDE_EXCEPTION_ENV_KEY = 'bizside.exception'

    def initialize(app)
      @app = app
    end

    def call(env)
      @app.call(env)
    rescue Exception => exception
        env[BIZSIDE_EXCEPTION_ENV_KEY] = exception # 発生した例外を保持
        raise exception
    end

  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
bizside-2.3.9 lib/bizside/show_exceptions.rb
bizside-3.0.3 lib/bizside/show_exceptions.rb
bizside-2.3.8 lib/bizside/show_exceptions.rb
bizside-3.0.2 lib/bizside/show_exceptions.rb
bizside-3.0.1 lib/bizside/show_exceptions.rb
bizside-3.0.0 lib/bizside/show_exceptions.rb
bizside-2.3.7 lib/bizside/show_exceptions.rb
bizside-2.3.6 lib/bizside/show_exceptions.rb
bizside-2.3.5 lib/bizside/show_exceptions.rb
bizside-2.3.4 lib/bizside/show_exceptions.rb
bizside-2.3.3 lib/bizside/show_exceptions.rb
bizside-2.3.2 lib/bizside/show_exceptions.rb
bizside-2.3.1 lib/bizside/show_exceptions.rb
bizside-2.3.0 lib/bizside/show_exceptions.rb
bizside-2.2.3 lib/bizside/show_exceptions.rb
bizside-2.2.2 lib/bizside/show_exceptions.rb
bizside-2.2.1 lib/bizside/show_exceptions.rb
bizside-2.2.0 lib/bizside/show_exceptions.rb
bizside-2.1.12 lib/bizside/show_exceptions.rb
bizside-2.1.11 lib/bizside/show_exceptions.rb