Re: Determining exceptions that can leak from a function

2009-06-16 Thread Ozzi Lee
You certainly should be able to do it using the Java reflection API on the repl. (.getMethods java.io.InputStream) will get you an array of Methods in InputStream. From there you should be able to get what you want: http://java.sun.com/j2se/1.4.2/docs/api/java/lang/reflect/Method.html This sort

Re: Determining exceptions that can leak from a function

2009-06-16 Thread tsuraan
> 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 com

Re: Determining exceptions that can leak from a function

2009-06-16 Thread Jarkko Oranen
tsuraan wrote: > Is there any way for me to tell what exceptions I'm not handling in a > clojure function? javac will yell at me if I don't either handle or > declare every possibility. I don't want the behaviour from clojure, > but having something like *warn-on-reflection* or even a function t

Determining exceptions that can leak from a function

2009-06-16 Thread tsuraan
Is there any way for me to tell what exceptions I'm not handling in a clojure function? javac will yell at me if I don't either handle or declare every possibility. I don't want the behaviour from clojure, but having something like *warn-on-reflection* or even a function to check for exception e