cider icon indicating copy to clipboard operation
cider copied to clipboard

`cider-inspector-inspect-last-exception` should inspect specific exceptions, not the last one

Open vemv opened this issue 7 months ago • 3 comments

cider-inspector-inspect-last-exception is meant to inspect the exception of the current stacktrace, as stored in *e.

However *e can sometimes store a different exception. I experienced it the other day for a contrived scenario (hitting my server with clj-http from the server's repl - so an exception would be thrown both in the server, and the repl - both in the same JVM).

Most times things work as intended, but using a more accurate means than last would result in better reliability.

Worth noting that there's "analyze-last-stacktrace" and "analyze-stacktrace". I made the mistake of introducing a "inspect-last-exception op - should have been "inspect-exception" accepting an argument.

vemv avatar Jan 21 '24 21:01 vemv

I'll have to look into the issue at hand, but in general for me it makes a lot of sense to have analyze/inspect-last-* and analyze/inspect-*, as having to constantly select what to operate on is a bit time consuming. It should always be an option, but some shortcuts for common scenarios make sense.

bbatsov avatar Jan 23 '24 12:01 bbatsov

Agreed. The original op can be handy as an interactive helper.

vemv avatar Jan 23 '24 12:01 vemv

Yeah, exactly.

bbatsov avatar Jan 23 '24 12:01 bbatsov