calva icon indicating copy to clipboard operation
calva copied to clipboard

Display clojure.lang.ExceptionInfo

Open emil0r opened this issue 5 years ago • 3 comments

For ez-database I capture errors that bubble up when interacting with the database and capture all of the relevant info. In this particular case the Exception error messages from JDBC are especially annoying to deal with by hand, since they have to be dealt with in context in order to capture the information, and you can have multiple messages.

The try-query macro handles this, captures the relevant information, and then throws a new exception with this info attached. I have mostly worked in Emacs, and all of this works really well in showing the developers what went wrong. Trying things out with Calva, I found that the data part of clojure.lang.ExceptionInfo is not displayed. Screenshots below to show the problem.

Screenshot 2020-11-24 at 13 22 48

Screenshot 2020-11-24 at 09 55 19

emil0r avatar Nov 24 '20 12:11 emil0r

Thanks for pointing this out! Definitely should show the ExceptionInfo data.

bpringe avatar Nov 24 '20 17:11 bpringe

Adding a bit more of context to the issue.

Distilled example of ExceptionInfo with provided :data key (aka ex-data). image

Current (Calva v2.0.221) displaying behavior when the exception above is thrown. image

Expected behavior: print the value of :data key alongside the exception.

fjolne avatar Oct 25 '21 16:10 fjolne

I think this could be something for the new Output Window to take care of.

PEZ avatar Jul 16 '25 06:07 PEZ