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

Erik Huelsmann ehuelsmann at common-lisp.net
Mon Dec 27 22:10:34 UTC 2010


Author: ehuelsmann
Date: Mon Dec 27 17:10:34 2010
New Revision: 13106

Log:
Make Interpreter.UnhandledCondition print its message formatted, instead of
the rather uninformative #<[class-name here] {@...}>.

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	Mon Dec 27 17:10:34 2010
@@ -484,10 +484,15 @@
         @Override
         public String getMessage() {
             String conditionText;
+            LispThread thread = LispThread.currentThread();
+            SpecialBindingsMark mark = thread.markSpecialBindings();
+            thread.bindSpecial(Symbol.PRINT_ESCAPE, NIL);
             try {
                 conditionText = getCondition().writeToString();
             } catch (Throwable t) {
                 conditionText = "<error printing Lisp condition>";
+            } finally {
+                thread.resetSpecialBindings(mark);
             }
 
             return "Unhandled lisp condition: " + conditionText;




More information about the armedbear-cvs mailing list