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

rschlatte at common-lisp.net rschlatte at common-lisp.net
Tue Jul 17 07:59:28 UTC 2012


Author: rschlatte
Date: Tue Jul 17 00:59:27 2012
New Revision: 14011

Log:
Robustify print-object of uninitialized class objects

- avoid recursive errors when invoking debugger because of
  validate-superclass failures

- Reproducible on the REPL via (class-prototype (find-class 'standard-class))

Modified:
   trunk/abcl/src/org/armedbear/lisp/print-object.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/print-object.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/print-object.lisp	Mon Jul 16 07:04:07 2012	(r14010)
+++ trunk/abcl/src/org/armedbear/lisp/print-object.lisp	Tue Jul 17 00:59:27 2012	(r14011)
@@ -50,7 +50,9 @@
 
 (defmethod print-object ((class class) stream)
   (print-unreadable-object (class stream :identity t)
-    (format stream "~S ~S" (class-name (class-of class)) (class-name class)))
+    ;; Avoid recursive errors for uninitialized class objects, e.g. when
+    ;; validate-superclass fails
+    (format stream "~S ~S" (class-name (class-of class)) (ignore-errors (class-name class))))
   class)
 
 (defmethod print-object ((gf generic-function) stream)




More information about the armedbear-cvs mailing list