it'd be nice if clojure came with an Exception class that extended
IMeta so you could use (catch MetaException e (if (= :my-exception
(type e)) do-stuff (throw e)))

On Sun, Nov 1, 2009 at 1:07 PM, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> Am 01.11.2009 um 20:47 schrieb Teemu Antti-Poika:
>
>
>> The only way I have managed to achieve this so far is to pre-compile
>> the class using gen-class and a separate compilation step. While
>> googling for solution I came across the old gen-and-load-class, which
>> seemed to do the trick in the old days (?) but is there a current way
>> do achieve the same?
>
> gen-class is what you are looking for. You can also use
> clojure.contrib.condition, but that also requires a compilation step.
>
> Be aware: you have to compile the class only once! As long as you
> don't change the signatures, you can redefine the underlying clojure
> code for the methods as you like without the need of recompilation. So
> compilation is a very weak argument against a solution if it solves
> your problem.
>
> Sincerely
> Meikel
>
>



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to