How does one go about getting Slime to catch exceptions from spawned 
threads:

user> (.start (Thread. (fn [] (/ 42 0))))   

The above exception ends up "outside" of Slime now; back in the terminal 
where `lein swank' was started.

I tried using a future also, but it has some properties I don't understand. 
This does not show an exception, even though the divide by zero must have 
happened(?):

user> (let [it (future (/ 42 0))]
        (Thread/sleep 100)
        (println (realized? it)))
true
nil


..this does show the excpetion, but "late":

user> (let [it (future (/ 42 0))]
        (Thread/sleep 100)
        (println (realized? it))
        (deref it))
true
; Evaluation aborted.


Agents catches exceptions "within themselves" for extraction later, but that 
isn't suitable in my current case.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to