[slime-devel] Truncated error messages in the debugger

This is a minor inconvenience since I can inspect the condition and find out what is really going on, but, just thought I would point it out. From cvs slime (a little out of date). Anyone else get this behavior? (defclass test-class () ((a :initarg :a) (b :initarg :b)) ) (defun func1 (lst) (declare (type list lst)) lst ) (defmethod print-object ((obj test-class) str) (format str "#<This is an objects special PRINT-OBJECT form ~A ~A>" (slot-value obj 'a) (slot-value obj 'b) )) ;; This causes an error (func1 expects a list) (func1 (make-array 20 :initial-contents (loop for i below 20 collect (make-instance 'test-class :a 1 :b 2) ))) In the debugger I get this (the error message here has lost the "is not of type LIST" part): The value #(#<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> ..) [Condition of type TYPE-ERROR] Restarts: 0: [ABORT] Return to SLIME's top level. 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" {1425AA89}>) Backtrace: 0: (FUNC1 #(#<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> #<This is an objects special PRINT-OBJECT form 1 2> ...))[:EXTERNAL] 1: (SB-INT:SIMPLE-EVAL-IN-LEXENV (FUNC1 (MAKE-ARRAY 20 :INITIAL-CONTENTS (LOOP FOR I BELOW 20 COLLECT ...))) #<NULL-LEXENV>) 2: (SWANK::EVAL-REGION "(func1 (make-array 20 :initial-contents (loop for i below 20 collect (make-instance 'test-class :a 1 :b 2)))) ")

* Zach <95f1acd0809212239y60250171vf07efcbc4697a480@mail.gmail.com> : Wrote on Sun, 21 Sep 2008 23:39:16 -0600: <Re: eliding of condition printed in debugger> Marco Barringer's last patch introduced a *SLDB-CONDITION-PRINTER* variable which defaults to FORMAT-SLDB-CONDITION/ Using this you can set (setf swank::*sldb-condition-printer* #'(lambda (c) (let ((*print-level* nil) (*print-lines* nil) (*print-length* nil) #+cmu (debug::*debug-print-length* nil) #+cmu (debug::*debug-print-level* nil)) (princ-to-string c)))) This should give you the full untruncated condition displayed in the debugger. Note this gets called in SWANK::SAFE-CONDITION-MESSAGE , and in some cases it becomes necessary to redefine that function to get desired behaviour. -- Madhu
participants (2)
-
Madhu
-
Zach