I'm not quite sure about your specific case, but is it possible to
just move the try-catch outside of the recursive function?
Perhaps this is not possible for your specific case, but it seems like
a clean way to handle it, so I would try and massage the problem into
something that can be expressed like this.
Hope that's helpful
-Patrick
eg.
(defn foo [i]
(println i)
(if (zero? i)
(throw (RuntimeException. "Reached Zero."))
(recur (dec i))))
(defn outer-foo [i]
(try
(foo i)
(finally
(println "finished."))))
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en