0.7.7.21:
authorWilliam Harold Newman <william.newman@airmail.net>
Tue, 10 Sep 2002 18:53:40 +0000 (18:53 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Tue, 10 Sep 2002 18:53:40 +0000 (18:53 +0000)
merged Antonio Martinez "file-error condition definition"
patch (sbcl-devel 2002-09-10)

NEWS
src/code/condition.lisp
tests/condition.pure.lisp [new file with mode: 0644]
version.lisp-expr

diff --git a/NEWS b/NEWS
index 0300b56..12d2d17 100644 (file)
--- 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
index bd9c545..9a3ae5e 100644 (file)
   ((pathname :reader file-error-pathname :initarg :pathname))
   (:report
    (lambda (condition stream)
-     (format stream
-            "~@<error on file ~_~S: ~2I~:_~?~:>"
-            (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 (file)
index 0000000..a36bd71
--- /dev/null
@@ -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"))
index cc51d59..26981f3 100644 (file)
@@ -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"