Reported by s-google...@localtoast.org, Jan 14, 2009
What (small set of) steps will reproduce the problem?
Invoke a java method which throws an AssertionError (or any other subclass
of Error), through reflection.
What is the expected output? What do you see instead?
I'd expect to catch the AssertionError object itself (which is the case for
a type-annotated call). Instead, I end up catching an InvocationTargetException
What version are you using?
Comment 1 by richhickey, Jan 24, 2009
Could you please provide some Clojure code that demonstrates the problem?
Comment 2 by s-google...@localtoast.org, Jan 29, 2009
; method defined through clojure for brevity, any java method which throws a
non-Exception will suffice
user=> (defn throw-error  (throw (new Error)))
; expected behavior (type annotation creates a direct call)
user=> (let [#^clojure.lang.IFn o throw-error] (.invoke o))
; unexpected behavior, the reflect code has wrapped our Throwable
user=> (let [o throw-error] (.invoke o))
Comment 3 by richhickey, Feb 23, 2009
fixed - svn 1303 - thank for the report
Comment 4 by berlin.brown, Feb 24, 2009
I am getting this error also, is this fixed in the december release:
"Simple utility to make directories. Throws error on invalid directory."
(if (empty? dirname) (throw (Error. "ERR: <mkdirs> Invalid Directory"))
(let [file (new File dirname)]
(if (not (.canWrite file))
(throw (Error. "ERR: <mkdirs> Invalid Directory. Cannot write."))
(try (.mkdirs file)
(catch Exception e
(throw (Error. (str "ERR: <mkdirs> Invalid Directory. Cannot
mkdir => "