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]
Other format: [Raw text]

Re: AW: java.lang.NullPointerException when loading SSAX.scm in kawa- 1.7


Hoehle, Joerg-Cyril wrote:

#|kawa:1|# (try-catch (catch #t (lambda () (+ "abc" 1)) (lambda _ #f)) (exc <java.lang.Exception> (display 6)))
java.lang.NullPointerException
        at gnu.expr.LambdaExp.getReturnType(LambdaExp.java:1548)
[...]

With the patch I posted last night (and just checked in), I get:


#|kawa:1|# (try-catch (catch #t (lambda () (+ "abc" 1)) (lambda _ #f)) (exc <java.lang.Exception> (display 6)))
<stdin>:1:34: warning - call to #<procedure +> throws java.lang.ClassCastException
6


Note that the warning doesn't get printed if you don't have the try-catch, since the warning doesn't get printed until after the expresion is evaluated. This is a bug, but fixing it would involve some core re-arrangement.
--
--Per Bothner
per@bothner.com http://per.bothner.com/




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