Sha256: 93e5b8329b3a00cc5e948bd2478ae713f09a24412c4b5d5e0e8c68fdcc754280

Contents?: true

Size: 386 Bytes

Versions: 23

Compression:

Stored size: 386 Bytes

Contents

# frozen_string_literal: true

module Praxis
  class ErrorHandler
    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
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
praxis-2.0.0 lib/praxis/error_handler.rb
praxis-2.0.pre.40 lib/praxis/error_handler.rb
praxis-2.0.pre.39 lib/praxis/error_handler.rb
praxis-2.0.pre.38 lib/praxis/error_handler.rb
praxis-2.0.pre.37 lib/praxis/error_handler.rb
praxis-2.0.pre.36 lib/praxis/error_handler.rb
praxis-2.0.pre.35 lib/praxis/error_handler.rb
praxis-2.0.pre.34 lib/praxis/error_handler.rb
praxis-2.0.pre.33 lib/praxis/error_handler.rb
praxis-2.0.pre.32 lib/praxis/error_handler.rb
praxis-2.0.pre.31 lib/praxis/error_handler.rb
praxis-2.0.pre.30 lib/praxis/error_handler.rb
praxis-2.0.pre.29 lib/praxis/error_handler.rb
praxis-2.0.pre.28 lib/praxis/error_handler.rb
praxis-2.0.pre.27 lib/praxis/error_handler.rb
praxis-2.0.pre.26 lib/praxis/error_handler.rb
praxis-2.0.pre.25 lib/praxis/error_handler.rb
praxis-2.0.pre.24 lib/praxis/error_handler.rb
praxis-2.0.pre.23 lib/praxis/error_handler.rb
praxis-2.0.pre.22 lib/praxis/error_handler.rb