/[slime]/slime/swank.lisp
ViewVC logotype

Diff of /slime/swank.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.794 by heller, Sat Oct 27 17:53:39 2012 UTC revision 1.795 by heller, Fri Nov 2 08:14:42 2012 UTC
# Line 2158  conditions are simply reported." Line 2158  conditions are simply reported."
2158      (send-to-emacs `(:debug-condition ,(current-thread-id)      (send-to-emacs `(:debug-condition ,(current-thread-id)
2159                                        ,(princ-to-string real-condition)))))                                        ,(princ-to-string real-condition)))))
2160    
2161  (defvar *sldb-condition-printer* #'format-sldb-condition  (defun condition-message (condition)
2162      (let ((*print-pretty* t)
2163            (*print-right-margin* 65)
2164            (*print-circle* t))
2165        (format-sldb-condition condition)))
2166    
2167    (defvar *sldb-condition-printer* #'condition-message
2168    "Function called to print a condition to an SLDB buffer.")    "Function called to print a condition to an SLDB buffer.")
2169    
2170  (defun safe-condition-message (condition)  (defun safe-condition-message (condition)
2171    "Safely print condition to a string, handling any errors during    "Safely print condition to a string, handling any errors during
2172  printing."  printing."
2173    (let ((*print-pretty* t) (*print-right-margin* 65)    (truncate-string
2174          (*print-length* 1000) (*print-level* 200))     (handler-case
2175      (truncate-string         (funcall *sldb-condition-printer* condition)
2176       (handler-case       (error (cond)
2177           (funcall *sldb-condition-printer* condition)         ;; Beware of recursive errors in printing, so only use the condition
2178         (error (cond)         ;; if it is printable itself:
2179           ;; Beware of recursive errors in printing, so only use the condition         (format nil "Unable to display error condition~@[: ~A~]"
2180           ;; if it is printable itself:                 (ignore-errors (princ-to-string cond)))))
2181           (format nil "Unable to display error condition~@[: ~A~]"     (ash 1 16)
2182                   (ignore-errors (princ-to-string cond)))))     "..."))
      (ash 1 16)  
      "...")))  
2183    
2184  (defun debugger-condition-for-emacs ()  (defun debugger-condition-for-emacs ()
2185    (list (safe-condition-message *swank-debugger-condition*)    (list (safe-condition-message *swank-debugger-condition*)

Legend:
Removed from v.1.794  
changed lines
  Added in v.1.795

  ViewVC Help
Powered by ViewVC 1.1.5