@@ -913,13 +913,16 @@ and the suffix matched by `cider-module-info-regexp'."
913913(defun cider--maybe-display-error-as-overlay (phase err end )
914914 " Possibly display ERR as an overlay honoring END,
915915depending on the PHASE."
916- (when (or
917- ; ; if we won't show *cider-error*, because of configuration, the overlay is adequate because it compensates for the lack of info in a compact manner:
918- (not cider-show-error-buffer)
919- (not (cider-connection-has-capability-p 'jvm-compilation-errors ))
920- ; ; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate:
921- (and cider-show-error-buffer
922- (member phase (cider-clojure-compilation-error-phases))))
916+ (when (and (or
917+ ; ; if we won't show *cider-error*, because of configuration, the overlay is adequate because it compensates for the lack of info in a compact manner:
918+ (not cider-show-error-buffer)
919+ (not (cider-connection-has-capability-p 'jvm-compilation-errors ))
920+ ; ; if we won't show *cider-error*, because of an ignored phase, the overlay is adequate:
921+ (and cider-show-error-buffer
922+ (member phase (cider-clojure-compilation-error-phases))))
923+ ; ; Only show overlays for things that do look like an exception (#3587):
924+ (or (string-match-p cider-clojure-runtime-error-regexp err)
925+ (string-match-p cider-clojure-compilation-regexp err)))
923926 ; ; Display errors as temporary overlays
924927 (let ((cider-result-use-clojure-font-lock nil )
925928 (trimmed-err (funcall cider-inline-error-message-function err)))
0 commit comments