This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
throws: keyword in class method
- From: John Whittaker <john dot whittaker at sbcglobal dot net>
- To: kawa at sources dot redhat dot com
- Date: Fri, 6 Aug 2010 08:44:27 -0700 (PDT)
- Subject: throws: keyword in class method
My kawa documentation tells me that I ought to be able to declare a method to
throw an exception like the example below shows:
(define-simple-class <MyTask> ( )
((execute ) :: <void> throws: ( <java.lang.Exception> )
(display "hello")
))
But when I do that, kawa complains:
/dev/stdin:4:34: throws not followed by a classname
java.lang.NullPointerException
at gnu.expr.LambdaExp.addMethodFor(LambdaExp.java:1076)
at gnu.expr.ClassExp.declareParts(ClassExp.java:328)
at kawa.standard.object.rewriteClassDef(object.java:562)
at kawa.standard.define_class.rewriteForm(define_class.java:110)
at kawa.lang.Translator.apply_rewrite(Translator.java:154)
at kawa.lang.Translator.rewrite_pair(Translator.java:314)
at kawa.lang.Translator.rewrite_with_position(Translator.java:944)
at kawa.lang.Translator.rewrite(Translator.java:629)
at kawa.lang.Translator.rewriteInBody(Translator.java:574)
at kawa.lang.Translator.rewriteBody(Translator.java:1246)
at kawa.lang.Translator.makeBody(Translator.java:1262)
at kawa.lang.Translator.resolveModule(Translator.java:1423)
at gnu.kawa.lispexpr.LispLanguage.resolve(LispLanguage.java:124)
at gnu.expr.Compilation.process(Compilation.java:1877)
at gnu.expr.ModuleExp.evalModule1(ModuleExp.java:213)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:182)
at kawa.Shell.run(Shell.java:281)
at kawa.Shell.run(Shell.java:194)
at kawa.Shell.run(Shell.java:175)
at kawa.repl.main(repl.java:852)
What's up here? Is my syntax wrong? I am using the latest kawa from SVN.
Thanks,
John Whittaker