From: William Harold Newman Date: Tue, 10 Sep 2002 18:53:40 +0000 (+0000) Subject: 0.7.7.21: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=1250e993756076f6e12a6459983d9a953529ff96;p=sbcl.git 0.7.7.21: merged Antonio Martinez "file-error condition definition" patch (sbcl-devel 2002-09-10) --- diff --git a/NEWS b/NEWS index 0300b56..12d2d17 100644 --- a/NEWS +++ b/NEWS @@ -1268,6 +1268,7 @@ changes in sbcl-0.7.8 relative to sbcl-0.7.7: (thanks to Alexey Dejneka) * fixed several bugs in PCL's error checking (thanks to Gerd Moellmann) + * fixed bug in printing of FILE-ERROR (thanks to Antonio Martinez) planned incompatible changes in 0.7.x: * When the profiling interface settles down, maybe in 0.7.x, maybe diff --git a/src/code/condition.lisp b/src/code/condition.lisp index bd9c545..9a3ae5e 100644 --- a/src/code/condition.lisp +++ b/src/code/condition.lisp @@ -582,15 +582,7 @@ ((pathname :reader file-error-pathname :initarg :pathname)) (:report (lambda (condition stream) - (format stream - "~@" - (file-error-pathname condition) - ;; FIXME: ANSI's FILE-ERROR doesn't have FORMAT-CONTROL and - ;; FORMAT-ARGUMENTS, and the inheritance here doesn't seem - ;; to give us FORMAT-CONTROL or FORMAT-ARGUMENTS either. - ;; So how does this work? - (serious-condition-format-control condition) - (serious-condition-format-arguments condition))))) + (format stream "error on file ~S" (file-error-pathname condition))))) (define-condition package-error (error) ((package :reader package-error-package :initarg :package))) diff --git a/tests/condition.pure.lisp b/tests/condition.pure.lisp new file mode 100644 index 0000000..a36bd71 --- /dev/null +++ b/tests/condition.pure.lisp @@ -0,0 +1,22 @@ +;;;; side-effect-free tests of the condition system + +;;;; This software is part of the SBCL system. See the README file for +;;;; more information. +;;;; +;;;; While most of SBCL is derived from the CMU CL system, the test +;;;; files (like this one) were written from scratch after the fork +;;;; from CMU CL. +;;;; +;;;; This software is in the public domain and is provided with +;;;; absolutely no warranty. See the COPYING and CREDITS files for +;;;; more information. + +(cl:in-package :cl-user) + +;;; Until 0.7.7.21, (MAKE-CONDITION 'FILE-ERROR :PATHNAME "FOO") +;;; wasn't printable, because the REPORT function for FILE-ERROR +;;; referred to unbound slots. This was reported and fixed by Antonio +;;; Martinez (sbcl-devel 2002-09-10). +(format t + "~&printable now: ~A~%" + (make-condition 'file-error :pathname "foo")) diff --git a/version.lisp-expr b/version.lisp-expr index cc51d59..26981f3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; for internal versions, especially for internal versions off the ;;; main CVS branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.7.7.20" +"0.7.7.21"