On Mon, Aug 16, 2010 at 10:37 AM, Meikel Brandmeyer <m...@kotka.de> wrote: > On 15 Aug., 23:41, Brian Marick <mar...@exampler.com> wrote: > >> I have a need to catch and handle all Java Throwables except those used by >> c.c.error-kit. I can identify an error-kit throwable like this: >> >> (re-find #"^Error Kit Control Exception" (.toString e))) >> >> That does not fill me with joy. What's the right way to do it?
You've probably put your finger on a weakness of error-kit, in that it uses exceptions for general stack manipulation. If you're not actually using continue or continue-with, you might be better off with c.c.condition -- flexible exception objects without error-kit's complexity. If you *are* actually using continue or continue-with, I'd be very interested to know your actual use cases. > You can shout at a provide private Var in error-kit until it does what > you want... > > (instance? @#'clojure.contrib.error-kit/ctrl-exception-class your- > throwable) > > Be advised, that this uses a clever trick which is maybe too clever? All of error-kit is in danger of being too clever. But it does seem like a predicate fn to do that might be warrented. Call it something like 'control-exception?'. --Chouser http://joyofclojure.com/ -- 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