Skip to content
Snippets Groups Projects
Commit 45a93f8d authored by pmai's avatar pmai
Browse files

Entomotomy Bug: condition-reporting-not-via-print-object

This change causes condition printing (generally) and condition reporting
(in particular) to go via print-object, once PCL is loaded, as required
by ANSI.  Note that the :report option of define-condition still goes
through the old non-print-object mechanism (which is allowed by ANSI),
but that this mechanism is now invoked via a default method of print-object
specialized on condition.  Hence user-defined methods on print-object
are now effective, instead of being bypassed through the old mechanism.
parent c8d88e5d
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/error.lisp,v 1.64 2002/08/23 18:31:04 pmai Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/error.lisp,v 1.65 2003/02/15 23:41:30 pmai Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -440,6 +440,11 @@
(defun %print-condition (s stream d)
(declare (ignore d))
(if (fboundp 'print-object)
(print-object s stream)
(real-print-condition s stream)))
(defun real-print-condition (s stream)
(if *print-escape*
(print-unreadable-object (s stream :identity t :type t))
(dolist (class (condition-class-cpl (class-of s))
......
......@@ -26,7 +26,7 @@
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/env.lisp,v 1.17 2003/02/06 15:20:12 gerd Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/env.lisp,v 1.18 2003/02/15 23:41:31 pmai Exp $")
;;;
;;; Basic environmental stuff.
;;;
......@@ -41,6 +41,10 @@
(defmethod print-object ((object structure-object) stream)
(lisp::default-structure-print object stream 0))
;;; Condition printing
(defmethod print-object ((object condition) stream)
(conditions::real-print-condition object stream))
(defgeneric describe-object (object stream))
(defmethod describe-object (object stream)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment