Function: cider--analyze-last-stacktrace

cider--analyze-last-stacktrace is a byte-compiled function defined in cider-compilation.el.

Signature

(cider--analyze-last-stacktrace CALLBACK)

Documentation

Send analyze-last-stacktrace to server and invoke CALLBACK on the result.

Accumulates a list of causes and then calls CALLBACK on causes and phase.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-compilation.el
(defun cider--analyze-last-stacktrace (callback)
  "Send `analyze-last-stacktrace' to server and invoke CALLBACK on the result.
Accumulates a list of causes and then calls CALLBACK on causes and phase."
  ;; Causes are returned as a series of messages, which we aggregate in `causes'
  (let (causes ex-phase)
    (cider-nrepl-send-request
     `("op" "cider/analyze-last-stacktrace")
     (lambda (response)
       (nrepl-dbind-response response (status phase id)
         (cond ((member "done" status)
                (nrepl--mark-id-completed id)
                (funcall callback causes ex-phase))
               (t
                (when phase
                  (setq ex-phase phase))
                (setq causes (append causes (list response))))))))))