class Rack::Banken::ExceptionHandler
Public Class Methods
new(app)
click to toggle source
# File lib/rack/banken/exception_handler.rb, line 5 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/rack/banken/exception_handler.rb, line 9 def call(env) begin @app.call(env) rescue Exceptions::Base => e raise e.class, e.message rescue => e raise Exceptions::InternalServerError, e.message end rescue Exceptions::Base => exception exception.to_rack_response end