Fork me on GitHub

Hi there, I'm just starting out with Reveal and so far I've been very impressed with it, so thank you for the wonderful tool 🙂 I did, however, come across something which I'm not sure if it's by design or not: For a Cursive project that I'm working on, I noticed that if I send a form that may result in some exception being thrown, to the contrary of my expectation, nothing is shown in Reveal. This has cost me a few hours to debug until I opened up the Cursive REPL window and saw everything being printed correctly. Is this behaviour by design? If not, is there any way I can reroute all the exception messages to Reveal, or better yet, reroute everything to Reveal? Thanks in advance.


Hi, thanks for your kind words! Can you show how it looks? Built-in reveal repls show thrown exceptions in the output... Is the exception thrown on a different thread that does not have *out* binding forwarded from the REPL? Do you use nrepl?


Ah sorry I think I've made a mistake. Sending forms to the REPL works fine with everything printed correctly. But if I use my frontend to send a request which triggers the same form, then all the messages won't be printed out correctly.


Here's a screenshot. Please ignore the empty space on the left.


Ah, this one is tricky because it happens on the different thread that does not forward *out* bindings. The solution to this is overriding System/out and System/err, which is hard to do because it's a global mutable state that can't be localized. This means, for example, that you can't start 2 reveal REPLs in the process and make them both receive all System/{out,err} output.


OTOH I clearly see the usefulness and thought about adding this, but so far I don't have an understanding of how to do that in a non-intrusive way


Ah that's a shame. Yeah I can see how this may be a bit tricky to implement. I guess for the time being I'll keep Cursive REPL as secondary. Thanks a lot for the help 😄