From 73a5d19d84012cd914e42161300e5be8d95fe50f Mon Sep 17 00:00:00 2001 From: sanjayl Date: Wed, 30 Mar 2016 22:36:57 -0400 Subject: [PATCH] Let sync op failures use stacktrace viewer This lets sync ops use the stacktrace viewer, just like how async ops currently do. Requires some changes to the CIDER-nREPL code as well which were submitted as CIDER-nREPL PR 327 https://github.com/clojure-emacs/cider-nrepl/pull/327. --- CHANGELOG.md | 2 ++ nrepl-client.el | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4670b6503..c5c5119ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Bugs fixed + +* [#1420](https://github.com/clojure-emacs/cider/issues/1420): Show stacktrace buffers for sync requests errors. * [cider-nrepl#329](https://github.com/clojure-emacs/cider-nrepl/pull/329): Fix error instrumenting functions that call clojure.tools.logging. * [#1632](https://github.com/clojure-emacs/cider/pull/1632): Redefining a function correctly updates eldoc. * [#1630](https://github.com/clojure-emacs/cider/pull/1630): The debugger no longer gets confused inside `@` redefs. diff --git a/nrepl-client.el b/nrepl-client.el index b784f0c19..2a940484f 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -968,11 +968,7 @@ sign of user input, so as not to hang the interface." ;; 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))) + (cider--render-stacktrace-causes (nrepl-dict-get response "pp-stacktrace")))) (when-let ((id (nrepl-dict-get response "id"))) (with-current-buffer connection (nrepl--mark-id-completed id)))