nrepl

https://github.com/nrepl/nrepl || https://nrepl.org
unwarysage 2018-02-27T00:33:09.000165Z

2018-02-27T00:33:21.000328Z

pr-values isn't what turns them in to strings

unwarysage 2018-02-27T00:33:23.000338Z

unwarysage 2018-02-27T00:34:00.000281Z

@hiredman are you thinking of bencode?

2018-02-27T00:34:15.000383Z

no

unwarysage 2018-02-27T00:34:24.000068Z

2018-02-27T00:34:29.000122Z

interruptible-eval does

2018-02-27T00:35:04.000246Z

it catches exceptions when evaling and sends them back as the error nrepl message with stirng values

2018-02-27T00:35:55.000097Z

likely the easiest thing to do would be to have your middleware watch for error nrepl messages and then eval *1 to get the error object (before pr-values)

2018-02-27T00:36:14.000305Z

pr-values only applies to the results of normal execution

unwarysage 2018-02-27T00:36:33.000183Z

this is invaluable to me.

unwarysage 2018-02-27T00:36:38.000141Z

Thank you very much

unwarysage 2018-02-27T00:39:50.000114Z

okay, follow up question. I have never seen a :ex keyword in a response, it's always been a string in :err

unwarysage 2018-02-27T00:44:57.000033Z

what makes :err

2018-02-27T00:45:59.000271Z

:err is a message printed to *err* not an exception

2018-02-27T00:46:08.000125Z

:err is like stderr

2018-02-27T00:46:21.000107Z

:out is like stdout

unwarysage 2018-02-27T00:46:56.000104Z

okay, and I have messages coming back with :err, so and no :ex so I did not think it was that simple

2018-02-27T00:48:08.000132Z

you can generate :errs by (binding [*out* *err*] (println "foo"))

2018-02-27T00:48:35.000325Z

and running code can do it at anytime without bubbling up an exception anywhere, or even throwing an exception

unwarysage 2018-02-27T00:58:35.000287Z

yes! this was exactly what I needed. Thank you very much @hiredman