class Bizside::ShowExceptions

Constants

BIZSIDE_EXCEPTION_ENV_KEY

Public Class Methods

new(app) click to toggle source
# File lib/bizside/show_exceptions.rb, line 6
def initialize(app)
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/bizside/show_exceptions.rb, line 10
def call(env)
  @app.call(env)
rescue Exception => exception
    env[BIZSIDE_EXCEPTION_ENV_KEY] = exception # 発生した例外を保持
    raise exception
end