This is the mail archive of the kawa@sourceware.org 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: Some other oddities


Sean Luke wrote:
A compile like this, followed by (require <ca>) (require <tutorial1>) works! Unfortunately, if I do (require <tutorial1>) first, I get

exception while initializing module tutorial1
        at gnu.expr.ModuleInfo.setupModuleExp(ModuleInfo.java:100)
...

If you send me a complete, self-contained, simplified test-case then
I'll try to take a look.  The more "minimal" the better, and precise
instructions as to what you do are also essential.

A possible work-around may be to compile the modules statically:
--module-static or --module-static-run.

Hmmm, I wasn't throwing anything -- it's an exception in Kawa I think.

Right, for but figuring out what is happening, it can be useful to add a printStackTrace in the Kawa code before the catch throws a new RuntimeException.

Though the attached patch is probably preferable.

(This may be moot for you if you're no longer trying to load a class
file, but I think the patch makes sense anyway.)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/
Index: kawa/standard/load.java
===================================================================
RCS file: /cvs/kawa/kawa/kawa/standard/load.java,v
retrieving revision 1.58
diff -u -r1.58 load.java
--- kawa/standard/load.java	24 May 2006 02:29:26 -0000	1.58
+++ kawa/standard/load.java	31 May 2006 18:49:36 -0000
@@ -39,17 +39,10 @@
 	if (inst instanceof Runnable)
 	  ((Runnable)inst).run();
       }
-    catch (ClassNotFoundException ex)
+    catch (Throwable ex)
       {
-	throw new RuntimeException ("class not found in load");
-      }
-    catch (InstantiationException ex)
-      {
-	throw new RuntimeException ("class not instantiable: in load");
-      }
-    catch (IllegalAccessException ex)
-      {
-	throw new RuntimeException ("class illegal access: in load");
+        throw new WrappedException("exception during load of \""+name+'\"',
+                                   ex);
       }
     finally
       {

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