def run
      response = nil
      @error_procs.each do |error_proc|
        result = nil
        begin
          result = error_proc.call(@exception, @context)
        rescue *STANDARD_ERROR_CLASSES => proc_exception
          @exception = proc_exception
        end
        response ||= response_from_proc(result)
      end
      response || response_from_exception(@exception)
    end
def run
      response = nil
      @error_procs.each do |error_proc|
        result = nil
        begin
          result = error_proc.call(@exception, @context)
        rescue *STANDARD_ERROR_CLASSES => proc_exception
          @exception = proc_exception
        end
        response ||= response_from_proc(result)
      end
      response || response_from_exception(@exception)
    end
The exception that we are generating a response for can change in the case
 that the configured error proc raises an exception. If this occurs, a
 response will be generated for that exception, instead of the original
 one. This is designed to avoid "hidden" errors happening, this way the
 server will respond and log based on the last exception that occurred.