[bknr-cvs] ksprotte changed trunk/projects/bos/web/quad-tree.lisp

BKNR Commits bknr at bknr.net
Thu Sep 4 14:03:38 UTC 2008


Revision: 3792
Author: ksprotte
URL: http://bknr.net/trac/changeset/3792

safer print-object method for node-extension

U   trunk/projects/bos/web/quad-tree.lisp

Modified: trunk/projects/bos/web/quad-tree.lisp
===================================================================
--- trunk/projects/bos/web/quad-tree.lisp	2008-09-04 13:39:10 UTC (rev 3791)
+++ trunk/projects/bos/web/quad-tree.lisp	2008-09-04 14:03:38 UTC (rev 3792)
@@ -177,8 +177,13 @@
   (def-extension-reader depth))
 
 (defmethod print-object ((node node-extension) stream)
-  (print-unreadable-object (node stream :type t :identity t)
-    (format stream "name: ~s path: ~s" (name node) (node-path node))))
+  (handler-case
+      (let ((name (name node))
+            (node-path (node-path node)))
+        (print-unreadable-object (node stream :type t :identity t)
+          (format stream "name: ~s path: ~s" name node-path)))
+    (error ()
+      (print-unreadable-object (node stream :type t :identity t)))))
 
 (defmethod delete-node-extension ((node node-extension))
   (setf (%extensions (base-node node))




More information about the Bknr-cvs mailing list