This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Kawa wraps Java exceptions unexpectedly
- To: kawa at sourceware dot cygnus dot com
- Subject: Kawa wraps Java exceptions unexpectedly
- From: Jocelyn Paine <popx at pop3 dot ifs dot org dot uk>
- Date: Sun, 7 Oct 2001 15:57:53 +0100 (GMT)
Consider
(make <java.io.FileReader> (make <java.io.File> "+&&^&&+"))
where the filename is invalid. I would have expected this to throw a
java.io.FileNotFoundException. Instead, it throws
java.lang.RuntimeException: java.io.FileNotFoundException: + %% && +++
where the original FileNotFoundException has been, I presume, converted to
a string and used as argument to the RuntimeException.
It's confusing that exceptions are wrapped in this way: page 10 on the
Java-Scheme interface doesn't state that this happens. (Now I know why my
Kawa servlet's exception handlers weren't working.) I'd like to suggest
that page 10 be updated to say this happens, but also, is there
any way to discover what the original exception was, other than by taking
the RuntimeException and chopping pieces out of its error message?
Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091