This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Kawa wraps Java exceptions unexpectedly


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 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]