Skip to content

Commit

Permalink
[#1420] Show stacktrace buffers for sync "eval" requests
Browse files Browse the repository at this point in the history
  • Loading branch information
bbatsov committed Nov 14, 2015
1 parent 4bd8e85 commit ff619b3
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions nrepl-client.el
Original file line number Diff line number Diff line change
Expand Up @@ -946,11 +946,16 @@ sign of user input, so as not to hang the interface."
(when (member "done" status)
(when-let ((ex (nrepl-dict-get response "ex"))
(err (nrepl-dict-get response "err")))
;; dump the stacktrace in the REPL
;; TODO: This has to be replaced with rendering of the
;; standard stacktrace buffer
(cider-repl-emit-interactive-stderr err)
(switch-to-buffer-other-window connection))
;; non-eval requests currently don't set the *e var
;; which is required by the stacktrace middleware
;; so we have to handle them differently until this is resolved
(if (member "eval-error" status)
(funcall nrepl-err-handler)
;; dump the stacktrace in the REPL
;; TODO: This has to be replaced with rendering of the
;; standard stacktrace buffer
(cider-repl-emit-interactive-stderr err)
(switch-to-buffer-other-window connection)))
(when-let ((id (nrepl-dict-get response "id")))
(with-current-buffer connection
(nrepl--mark-id-completed id)))
Expand Down

0 comments on commit ff619b3

Please sign in to comment.