> Clojure is dynamic, and there's simply no way to tell what exceptions
> a function might throw, because functions can be redefined and they
> can take other functions as parameters. On the Java side, the core
> code actually has a catch-all that wraps all exceptions, just to stop
> Java from complaining about non-declared exceptions and non-caught
> ones.

Would it be possible to determine the exceptions that are thrown by
the java functions called by a clojure function?  Does that
information exist in the java type signatures or any data associated
with a function?

> Generally, exceptions will only occur if your code has a bug. That is,
> unless you're doing IO or something else inherently non-functional, in
> which case you should isolate the dangerous code and exercise extra
> care anyway.

Yeah, it's basically IO that I'm concerned with.  I'm mostly using
clojure to glue together AMQP, Lucene, and JInterface; my code is
really small, but those three have all sorts of exceptions they can
throw depending on network failures, disk corruption, etc.  I'd like
an easy way to ensure that I'm properly catching failures, especially
in the lucene area, where I need to rebuild corrupt indices when they
go bad.  Some way of making sure I don't miss exceptions would be
nice; perhaps something more automatic than reading the documentation
would be ideal :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to