diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2015-11-14 17:04:28 +0200 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2015-11-14 17:04:28 +0200 |
commit | ff619b31ce40184e07623335741981c6a81e84d3 (patch) | |
tree | 5d12e06c15eb181981112107be6e190cc4b3d2c1 /nrepl-client.el | |
parent | 4bd8e85b699cae6ac1e0a0beb8b75332c9d38881 (diff) |
[#1420] Show stacktrace buffers for sync "eval" requests
Diffstat (limited to 'nrepl-client.el')
-rw-r--r-- | nrepl-client.el | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/nrepl-client.el b/nrepl-client.el index d81e7de2..162118c4 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -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))) |