This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Problem with primitive-throw?
- From: "Dominique Boucher" <dominique dot boucher at nuecho dot com>
- To: "'Kawa List'" <kawa at sources dot redhat dot com>
- Date: Fri, 20 Feb 2004 09:55:50 -0500
- Subject: Problem with primitive-throw?
- Reply-to: <dominique dot boucher at nuecho dot com>
Hi,
When I try to compile this piece of code:
(try-catch
(begin
(format (current-error-port) "Testing ...~%")
(primitive-throw (make <java.lang.RuntimeException> "test")))
(exc <java.lang.Throwable>
(format (current-error-port) "an error occurred!~%")))
I get the following error:
(compiling test.scm)
Internal error while compiling test.scm:3
java.lang.Error: popType called with empty stack
test.apply(gnu.mapping.CallContext)void
at gnu.bytecode.CodeAttr.popType(CodeAttr.java:207)
at gnu.bytecode.CodeAttr.emitStore(CodeAttr.java:1072)
at gnu.bytecode.CodeAttr.emitTryEnd(CodeAttr.java:1876)
at gnu.expr.TryExp.compile(TryExp.java:59)
at gnu.expr.Expression.compileNotePosition(Expression.java:98)
at gnu.expr.Expression.compileWithPosition(Expression.java:84)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1376)
at gnu.expr.Compilation.addClass(Compilation.java:1658)
at gnu.expr.Compilation.compile(Compilation.java:908)
at gnu.expr.Compilation.compileToFiles(Compilation.java:955)
at kawa.lang.CompileFile.compile_to_files(CompileFile.java:92)
at kawa.repl.processArgs(repl.java:389)
at kawa.repl.main(repl.java:634)
Am I doing something wrong?
I use Kawa 1.7.90 on cygwin, JDK1.4.1_01.
Dominique Boucher