sanel / monroe

Clojure nREPL client for Emacs
161 stars 21 forks source link

Display error messages with `message'. #19

Closed technomancy closed 7 years ago

technomancy commented 7 years ago

When monroe-detail-stacktraces is set and we are printing full stack traces, also fetch the exception's message and display it using message.

This also includes a change which generalizes monroe-old-style-stacktraces; instead of a boolean old/new it allows you to set an arbitrary stack trace printing function, which allows you to use 3rd-party libs.

I am on the fence about whether this is the right place for this functionality; maybe coupling it with monroe-detail-stacktraces is not wise; what do you think?

sanel commented 7 years ago

What is the use case for monroe-print-stack-trace-function; is it elisp function that will inspect received trace or custom clojure function on server side?

Also, regarding displaying error with message, wouldn't full stacktrace clobber mini-buffer?

technomancy commented 7 years ago

What is the use case for monroe-print-stack-trace-function; is it elisp function that will inspect received trace or custom clojure function on server side?

It should refer to a clojure function (custom or not) but I will try to make this clearer in the docstring. The intention is to replace the monroe-old-style-stacktraces boolean with something more flexible.

Also, regarding displaying error with message, wouldn't full stacktrace clobber mini-buffer?

Only the .getMessage string is displayed; this should be a single line.

sanel commented 7 years ago

Hm... isn't the same propagated in root-ex or ex parameters?

technomancy commented 7 years ago

Quite right; it should not need to get this from the server with an additional request. I've amended the PR.

technomancy commented 7 years ago

Does this look better with the amended commit?

sanel commented 7 years ago

Sorry for delay.

Looks very good. Thanks!

yayitswei commented 7 years ago

Not sure where else to say this, but I use monroe every day and thanks to both of you for continuing to improve it! 👍

sanel commented 7 years ago

Thanks @yayitswei. Really appreciate your feedback :)

danielsz commented 7 years ago

Same here. I use it and like it tons. :+1: