module Roda::RodaPlugins::ErrorHandler::InstanceMethods
def _handle_error(e)
of 500. Run after hooks on the rack response, but if any error occurs
Handle the given exception using handle_error, using a default status
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