Fork me on GitHub
#nrepl
<
2018-09-15
>
Charlot01:09:00

Hello all again.

Charlot01:09:34

I am trying to find a way for a piece of middleware to access a var bound in the current thread

Charlot01:09:05

It seems messages inbound to the nREPL have

:session
bound to an atom containing the bindings. But the message on the way out seems to just have the session id bound

Charlot01:09:32

This confuses me, as it seems that it should be the other way around

Charlot01:09:24

That session id needs to be on the inbound message, and bound variables put on the transport back

Charlot01:09:32

does anyone have any insight into this?

hiredman01:09:22

it will depend where in the stack your middleware goes

Charlot01:09:06

my

set-descriptor!
call only specifies
"eval"
as expected

Charlot01:09:10

I wrap the transport of every inbound message to gain access to messages on the way out

Charlot02:09:19

this is the raw code

Charlot02:09:45

at present only updating the error message with a test string

Charlot02:09:38

Ideally I would be assoc-ing in the a value derived from the raw exception. (in line 16) IE, I would love to be able to access

*e

Charlot06:09:18

@bozhidar Ah, I have seen that one before. Please correct me if I am wrong, but is that not dealing with errors thrown by the middleware, not the user code?

bozhidar06:09:09

Ah, yeah - that’s right. I’m wasn’t quite certain what you’re trying to achieve.

Charlot16:09:13

I'm trying to capture error messages thrown from user code, so I can re-write them for simplicity, so that beginning students can use clojure for their first programming language