lib/roda/plugins/error_handler.rb
def _handle_error(e)
          res = @_response
          res.send(:initialize)
          res.status = 500
          res = _roda_handle_route{handle_error(e)}
          begin
            _roda_after(res)
          rescue => e2
            if errors = env['rack.errors']
              errors.puts "Error in after hook processing of error handler: #{e2.class}: #{e2.message}"
              e2.backtrace.each{|line| errors.puts(line)}
            end
          end
          res
        end
# Handle the given exception using handle_error, using a default status
# of 500.  Run after hooks on the rack response, but if any error occurs
# when doing so, log the error using rack.errors and return the response.
Handle the given exception using handle_error, using a default status
of 500.  Run after hooks on the rack response, but if any error occurs
when doing so, log the error using rack.errors and return the response.
Handle the given exception using handle_error using a default status of 500 . Run after hooks on the rack response but if any error occurs when doing so log the error using rack . errors and return the response .
def _handle_error(e)
          res = @_response
          res.send(:initialize)
          res.status = 500
          res = _roda_handle_route{handle_error(e)}
          begin
            _roda_after(res)
          rescue => e2
            if errors = env['rack.errors']
              errors.puts "Error in after hook processing of error handler: #{e2.class}: #{e2.message}"
              e2.backtrace.each{|line| errors.puts(line)}
            end
          end
          res
        end
def _handle_error ( e ) res = @_response res . send ( :initialize ) res . status = 500 res = _roda_handle_route { handle_error ( e ) } begin _roda_after ( res ) rescue => e2 if errors = env [ 'rack.errors' ] errors . puts "Error in after hook processing of error handler: #{e2.class}: #{e2.message}" e2 . backtrace . each { | line | errors . puts ( line ) } end end res end
Handle the given exception using handle_error, using a default status
of 500.
Handle the given exception using handle_error using a default status of 500 .
e