                             `((filepath . ,conf-file))))))
     (ycmd-notify-file-ready-to-parse)))
 
-(defun ycmd--handle-buffer-parsing-exception (results)
+(defun ycmd--handle-runtime-exception (results)
   "Handle exeption for file already being parsed runtime error."
-  (when (and (string-equal (assoc-default 'TYPE (assoc-default 'exception results))
-                      "RuntimeError")
-             (string-equal (assoc-default 'message results)
-                           "File already being parsed."))
-    (ycmd--report-status 'parsing)))
+  (let* ((exception (assoc-default 'exception results))
+         (exception-type (assoc-default 'TYPE exception))
+         (message (assoc-default 'message results)))
+    (cond ((and (string-equal exception-type "RuntimeError")
+                (string-equal message "File already being parsed."))
+           (setq ycmd--file-already-parsing-exception t)))))
 
 (defun ycmd--handle-notify-response (results)
   "If RESULTS is a vector or nil, the response is an acual parse result.

      (run-hook-with-args 'ycmd-file-parse-result-hook results)
    (when (assoc 'exception results)
      (ycmd--handle-exception
       results #'ycmd--handle-buffer-parsing-exception))))

(defun ycmd-notify-file-ready-to-parse ()
  "Send a notification to ycmd that the buffer is ready to be parsed.

        (deferred:nextc it
          (lambda ()
            (with-current-buffer buff
              (when (ycmd--parsing-buffer-finished-p)
                (ycmd--report-status 'parsed)))))))))

(defun ycmd-display-raw-file-parse-results ()
  "Request file-parse results and display them in a buffer in raw form.
