class Praxis::ErrorHandler

Public Instance Methods

handle!(request, error) click to toggle source
# File lib/praxis/error_handler.rb, line 5
def handle!(request, error)
  Application.instance.logger.error error.inspect
  error.backtrace.each do |line|
    Application.instance.logger.error line
  end

  response = Responses::InternalServerError.new(error: error)
  response.request = request
  response.finish
end