[armedbear-cvs] r13092 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Sat Dec 11 23:52:36 UTC 2010


Author: ehuelsmann
Date: Sat Dec 11 18:52:35 2010
New Revision: 13092

Log:
Store the original Java error in the "cause" field
of the UnhandledCondition error, *if* the cause is a Java exception.

Modified:
   trunk/abcl/src/org/armedbear/lisp/Interpreter.java

Modified: trunk/abcl/src/org/armedbear/lisp/Interpreter.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Interpreter.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Interpreter.java	Sat Dec 11 18:52:35 2010
@@ -492,7 +492,6 @@
     {
         @Override
         public LispObject execute(LispObject first, LispObject second)
-            throws UnhandledCondition
         {
             final LispObject condition = first;
             if (interpreter == null) {
@@ -525,7 +524,11 @@
                     thread.resetSpecialBindings(mark);
                 }
             }
-            throw new UnhandledCondition(condition);
+            UnhandledCondition uc = new UnhandledCondition(condition);
+            if (condition.typep(Symbol.JAVA_EXCEPTION) != NIL)
+                uc.initCause((Throwable)JavaException
+                        .JAVA_EXCEPTION_CAUSE.execute(condition).javaInstance());
+            throw uc;
         }
     };
 




More information about the armedbear-cvs mailing list