Fork me on GitHub

Is there a way to customise the way that CIDER shows the exception messages when an error is thrown? It seems to show all the information for the first exception, and only the exception class for the exception causes. It would be quite helpful if I could also have the exception message shown for all of the causes, and perhaps to not fully expand the first exception. When Integrant throws an exception during init, it provides a lot of data in the ex-data which can be a bit overwhelming. This is what I currently get

Show: Project-Only All 
  Hide: Clojure Java REPL Tooling Duplicates  (0 frames hidden)

2. Unhandled

1. Caused by clojure.lang.ExceptionInfo
   Error on key :duct.server.http/aleph when building system
   {:reason :integrant.core/build-threw-exception,
       < ... 600 lines ... >
    :function #multifn[init-key 0x4f0a4cb8],
    :key :duct.server.http/aleph,
    :value {:port 8686, :handler #function[clojure.lang.AFunction/1]}}
                 core.cljc:  285  integrant.core$build_exception/invokeStatic
                 core.cljc:  284  integrant.core$build_exception/invoke
                 core.cljc:  296  integrant.core$try_build_action/invokeStatic
                  <... elided ...>
               session.clj:  171  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  170  nrepl.middleware.session/session-exec/main-loop
           22  clojure.lang.AFn/run
       834  java.lang.Thread/run
< cursor is here, right at the bottom >


Here's what I'd like to have by default (I think)

Show: Project-Only All 
  Hide: Clojure Java REPL Tooling Duplicates  (0 frames hidden)

2. Unhandled
   Address already in use

1. Caused by clojure.lang.ExceptionInfo
   Error on key :duct.server.http/aleph when building system

👌 1

I guess a secondary feature request here would be to have more control over expanding the ex-message separately from the ex-data, or perhaps limiting how big the ex-data can be printed in the stacktrace buffer.


@danielcompton Not yet. The current display was not intended and is basically the result of the changes in Clojure 1.10. I was actually planning to just strip this data from the first stack frame, as it kind of breaks the structure of the stacktrace.


I think there was some ticket where we were discussing how to best handle this, I’ll have to dig it up.


@robertkrahn is there a huge performance drop down after suitable introduced into cider? I usually do complete by pressing TAB, when the complete menu popup, I can hardly type


@doglooksgood It depends on the speed of the repl connection / how long an eval takes. Suitable evals a code snippet so this might introduce a noticeable lag. It should only happen in interop expressions, though (e.g when typing (.| js/fooo))


We will add a switch to allow to deactivate suitable, I think. We might also consider having a timeout.


This happened when I type (re-frame/|)


Not sure if the suitable is the cause, I have upgrade cider recently


Hmm this should not trigger suitable


I will check with profiler


are you connected to a local browser? is there a lag when you eval an expression?


yes, local browser.


a little lag when eval an expression


OK, I will check that and whether suitable really won't get triggered for normal symbol completions (it shouldn't eval in that case but I will check). As I said, I'm pretty sure there will be a switch to disable suitable before long. Thanks for letting me know 🙂

👍 1

Error loading refactor-nrepl.middleware: Could not locate cider/nrepl/middleware/util/cljs__init.class or cider/nrepl/middleware/util/cljs.clj on classpath., compiling:(refactor_nrepl/middleware.clj:1:1)
Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: refactor-nrepl.middleware/wrap-refactor in this context, compiling:(/private/var/folders/rd/0xkr22fd1jq8y8j4856s7sy40000gp/T/form-init8061324572855299348.clj:1:2313)


I can’t seem to get my cider jack in to work, this error keeps coming up. Any ideas?


Do you have the clj-refactor Emacs package installed? In that case see


yeah I just removed it, and things work \o/


If you want to keep using it you can add refactor-nrepl {:mvn/version "2.5.0-SNAPSHOT"} into your user deps.edn or project deps. Even though it isn't fully compatible anymore I still can use it for various things like import cleanups and such.