Sorry,

too eager too soon. (loop (try ..) ) obviously doesn't work :)


2014/1/22 László Török <ltoro...@gmail.com>

> Hi,
>
> I have a processing loop in a go block and I wanted to make sure that the
> processing continue with the next iteration if an exception is thrown.
>
> The following code doesn't seem to be accepted by the go macro:
>
> (go
>  (loop [xs (range 10)]
>    (when-let [x (first xs)]
>      (try
>        (println x)
>        (recur (rest x))
>        (catch Throwable t nil)))))
>
> as it returns IllegalArgumentException No implementation of method:
> :emit-instruction of protocol:
> #'clojure.core.async.impl.ioc-macros/IEmittableInstruction found for class:
> clojure.core.async.impl.ioc_macros.Jmp
>
> I can't think of an alternative right now, any ideas?
>
> --
> László Török
>



-- 
László Török

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to