On Sun, Nov 16, 2008 at 4:23 AM, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote: > Hi, > > I tried the following code, which is a valid loop, IMHO, since it > doesn't leave the catch clause. > > (try > :xxx > (catch Exception e > (loop [x e] > (if (nil? (.getCause x)) > x > (recur (.getCause x)))))) > > However I get: > > java.lang.UnsupportedOperationException: Cannot recur from catch/finally > (NO_SOURCE_FILE:1) > > Is this intended?
You could of course work around this by putting your loop in some other function and calling it from inside catch. --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---