0.6.9.9:
[sbcl.git] / src / code / late-target-error.lisp
index a636049..7c28116 100644 (file)
@@ -13,7 +13,7 @@
 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
 ;;;; files for more information.
 
-(in-package "SB!CONDITIONS")
+(in-package "SB!KERNEL")
 \f
 ;;;; the CONDITION class
 
                   (error 'simple-type-error
                          :datum thing
                          :expected-type 'condition-class
-                         :format-control "bad thing for class arg:~%  ~S"
+                         :format-control "bad thing for class argument:~%  ~S"
                          :format-arguments (list thing)))))
         (res (make-condition-object args)))
     (setf (%instance-layout res) (class-layout class))
                       (arithmetic-error-operation condition)
                       (arithmetic-error-operands condition))))))
 
-(define-condition division-by-zero      (arithmetic-error) ())
+(define-condition division-by-zero         (arithmetic-error) ())
 (define-condition floating-point-overflow  (arithmetic-error) ())
 (define-condition floating-point-underflow (arithmetic-error) ())
 (define-condition floating-point-inexact   (arithmetic-error) ())
-(define-condition floating-point-invalid-operation   (arithmetic-error) ())
+(define-condition floating-point-invalid-operation (arithmetic-error) ())
 
 (define-condition print-not-readable (error)
   ((object :reader print-not-readable-object :initarg :object))
        (format stream "~S cannot be printed readably." obj)))))
 
 (define-condition reader-error (parse-error stream-error)
+  ;; FIXME: Do we need FORMAT-CONTROL and FORMAT-ARGUMENTS when
+  ;; we have an explicit :REPORT function? I thought we didn't..
   ((format-control
     :reader reader-error-format-control
     :initarg :format-control)
 ;;; floating point exceptions?
 (define-condition floating-point-exception (arithmetic-error)
   ((flags :initarg :traps
+          :initform nil
          :reader floating-point-exception-traps))
   (:report (lambda (condition stream)
             (format stream
              :initform nil)
    (namestring :reader namestring-parse-error-namestring :initarg :namestring)
    (offset :reader namestring-parse-error-offset :initarg :offset))
-  (:report %print-namestring-parse-error))
+  (:report
+   (lambda (condition stream)
+     (format stream
+            "parse error in namestring: ~?~%  ~A~%  ~V@T^"
+            (namestring-parse-error-complaint condition)
+            (namestring-parse-error-arguments condition)
+            (namestring-parse-error-namestring condition)
+            (namestring-parse-error-offset condition)))))
 
 (define-condition simple-package-error (simple-condition package-error) ())