This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-06
Channels
- # adventofcode (99)
- # announcements (9)
- # aws (3)
- # babashka (22)
- # beginners (90)
- # boot (2)
- # calva (22)
- # cider (8)
- # clj-kondo (14)
- # cljsrn (20)
- # clojure (24)
- # clojure-europe (4)
- # clojure-italy (3)
- # clojure-losangeles (1)
- # clojure-nl (83)
- # clojure-spain (1)
- # clojure-spec (46)
- # clojure-uk (43)
- # clojuredesign-podcast (70)
- # clojurescript (40)
- # cursive (25)
- # datomic (9)
- # duct (3)
- # emacs (14)
- # figwheel-main (2)
- # fulcro (61)
- # graalvm (8)
- # juxt (7)
- # kaocha (2)
- # leiningen (19)
- # luminus (5)
- # malli (58)
- # off-topic (4)
- # re-frame (11)
- # reitit (5)
- # rewrite-clj (3)
- # shadow-cljs (63)
- # sql (5)
- # testing (5)
- # tools-deps (26)
- # uncomplicate (2)
- # vim (4)
For instance:
(sequence (comp (take 100)
(map (fn [i]
(when (= i 99)
(throw (RuntimeException.))))))
(range))
maybe it wasn't thrown :) sequence is lazy
or I should say "incrementally computed" (it's a bit different than lazy sequences)
CLI REPL says:
(sequence (comp (take 10)
(map (fn [i]
(when (= i 9)
(throw (RuntimeException.))))))
(range))
Error printing return value at user/eval8534$fn (NO_SOURCE_FILE:3).
null
Also looking at another issue where I can't use quick doc on anything either via f1 or triggering the actions bar and selecting quick doc, but if I enable this setting: https://i.imgur.com/raqxHEQ.png quick docs appear on mouse move
CLI REPL says:
(sequence (comp (take 10)
(map (fn [i]
(when (= i 9)
(throw (RuntimeException.))))))
(range))
Error printing return value at user/eval8534$fn (NO_SOURCE_FILE:3).
null
well there you go - that's your exception
this may be an nrepl thing
is your connection broken?
the provided repl function should catch that during printing, and by default print to stderr, which also by default should get sent over the socket out stream to the client
I'm not sure if cursive uses that repl, or what it does on the client side
Just using a socket repl outside Cursive, it seems to work:
;; terminal 1
clj -J-Dclojure.server.repl="{:port,5555,:accept,clojure.core.server/repl}"
;; terminal 2
$ nc localhost 5555
user=> (sequence (comp (take 10)
(map (fn [i]
(when (= i 9)
(throw (RuntimeException.))))))
(range))
(Error printing return value at user/eval1$fn (NO_SOURCE_FILE:3).
null
*e is properly bound and client still works fine after that
so probably something with stderr tunneling if an error happens during print