Hi folks,

greetings from a beginning clojurian!

Below a dilemma I noticed recently. I think/hope I've missed
something, since what I am trying to do does not sound too exotic. Any
clues are appreciated!

I want to use my own exceptions to control program flow. I want to
catch my own exceptions and let the surrounding container worry about
other exceptions. In order to do this, I must catch my exceptions
selectively by type name, say FooException. But how do I define a
_named_ java class in clojure? Function proxy creates an anonymous
class and I cannot refer to it in the catch expression!

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?

Looking for clues,
Teemu



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