Sha256: 63580e64d262d74ef6eaec9973e33a749f86f7a255e4ca5f9586550a6818cc54

Contents?: true

Size: 357 Bytes

Versions: 35

Compression:

Stored size: 357 Bytes

Contents

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

35 entries across 35 versions & 1 rubygems

Version Path
praxis-2.0.pre.18 lib/praxis/error_handler.rb
praxis-2.0.pre.17 lib/praxis/error_handler.rb
praxis-2.0.pre.16 lib/praxis/error_handler.rb
praxis-2.0.pre.15 lib/praxis/error_handler.rb
praxis-2.0.pre.14 lib/praxis/error_handler.rb
praxis-2.0.pre.13 lib/praxis/error_handler.rb
praxis-2.0.pre.12 lib/praxis/error_handler.rb
praxis-2.0.pre.11 lib/praxis/error_handler.rb
praxis-2.0.pre.10 lib/praxis/error_handler.rb
praxis-2.0.pre.9 lib/praxis/error_handler.rb
praxis-2.0.pre.8 lib/praxis/error_handler.rb
praxis-2.0.pre.7 lib/praxis/error_handler.rb
praxis-2.0.pre.6 lib/praxis/error_handler.rb
praxis-2.0.pre.5 lib/praxis/error_handler.rb
praxis-2.0.pre.4 lib/praxis/error_handler.rb
praxis-2.0.pre.3 lib/praxis/error_handler.rb
praxis-2.0.pre.2 lib/praxis/error_handler.rb
praxis-2.0.pre.1 lib/praxis/error_handler.rb
praxis-0.21 lib/praxis/error_handler.rb
praxis-0.20.1 lib/praxis/error_handler.rb