Hi Dima, I think you can already add multiple types of exceptions with raise-on... I am sure it was there in my tests... :) will confirm today. It shouldn't be too hard to add a finally clause into the raise-on macro... Thanks for you suggestion
i would caution again using too much of raise-on.... in the example that you gave, raise-on acts like a catch. The stack is lost right up at that point. And so you won't get any benefits on being able to call 'continue' by using it like that to deal with different types of circumstances. On 27/09/2013, at 4:32, Dima Sabanin <sdmi...@gmail.com> wrote: > Thanks for implementing this! > > I found myself in a situation when I needed to provide different exceptions > types triggering different errors in the raise-on macro. I implemented this > as a macro that's just nesting the raise-on blocks: > https://gist.github.com/dsabanin/6717877 > > Is that something that makes sense? If it is, it probably makes sense to > extend raise-on macro with this, but it might get a bit complex after that. > > > > On Wed, Sep 25, 2013 at 10:20 PM, zcaudate <z...@caudate.me> wrote: >> Hi Dima, >> >> You can now put 'finally' clause in v0.2.2, just loaded onto clojars. >> >> I haven't done an example on the readme yet.... >> >> but the following should print a hello and return [1 2 :A]: >> >> >> (manage ;; L2 >> [1 2 (manage ;; L1 >> (raise :A) ;; L0 >> (on :A [] :A))] ;; H1A >> (on :B [] :B) (finally (print "hello"))) >> Chris. >> >> >> >> On Thursday, September 26, 2013 1:26:37 AM UTC+10, Dima Sabanin wrote: >>> Hi Chris! >>> >>> Great library! I'm trying to apply this to a project I'm working on, but >>> I'm somewhat new to the conditional restarts theory. What would I use >>> instead of Clojure's finally block to properly free up the resources on >>> error escalation? >>> >>> -- >>> Thanks, >>> Dima Sabanin >>> http://twitter.com/dimasabanin >>> >>> >>> On Wed, Sep 25, 2013 at 3:14 AM, zcaudate <z...@caudate.me> wrote: >>>> I've done a pretty comprehensive guide on conditional restart systems in >>>> clojure with diagrams to show why it is much more flexible over try/catch >>>> mechanism >>>> >>>> Project: >>>> https://github.com/zcaudate/ribol >>>> >>>> Generated Documentation: >>>> http://z.caudate.me/ribol/ >>>> >>>> >>>> >>>> -- >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Clojure" group. >>>> To post to this group, send email to clo...@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+u...@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+u...@googlegroups.com. >>>> >>>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >>> >>> -- >>> Best regards, >>> Dima Sabanin >>> http://twitter.com/dimasabanin >> >> -- >> -- >> 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. > > > > -- > Best regards, > Dima Sabanin > http://twitter.com/dimasabanin > -- > -- > 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 a topic in the Google > Groups "Clojure" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/clojure/elRWA13Iidg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- -- 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.