* Jon Dyte
| > (setq test (make-zzz))
| > [ #<Printer Error @ #x5654321>#
| ^^^^^^^^^^;; this varies
| Note the right " ]" does not get printed
attached is a sample run that should illuminate the problem.
#:Erik
CL-USER(1): [In listener #12]
CL-USER(2): (defstruct (zzz (:conc-name nil)
(:print-function print-zzz))
(anything 23))
zzz
CL-USER(3): (defun print-zzz (obj stream level)
(write-string "[ " stream)
;; next-lines to deliberatley throw an error
(let ((element (car t)))
(write element :stream stream))
(write-string " ]" stream))
print-zzz
CL-USER(4): (make-zzz)
[ #<Printer Error @ #x55a8da>
CL-USER(5): (setq excl::*printer-handle-errors* nil)
nil
CL-USER(6): (handler-case (print (make-zzz))
(error (x) (inspect x)))
simple-error @ #x55c6aa = #<simple-error @ #x55c6aa>
0 Class --------> #<standard-class simple-error>
1 PLIST --------> The symbol nil
2 FORMAT-ARGUMENTS -> (t), a proper list with 1 element
3 FORMAT-CONTROL -> A simple-string (57) that starts <<Attempt at "~1> to t"
[1i] CL-USER(7): (error *)
Error: Attempt to take the car of t which is not listp.
[condition type: simple-error]
[2] CL-USER(8): :pop
[1i] CL-USER(9): :pop
CL-USER(10):
---------------------------------------------------------------------