X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-target-error.lisp;h=7c28116490a166d1faf695760d8a5ddbdec3a242;hb=212ef8043aeaceaa627f2924e04554fbc37b8ee1;hp=795a5a8c72b226e2e67ec8e367bbf05c7d623018;hpb=5dc28680e9cb2d598da02aed512aa49ea81fdade;p=sbcl.git diff --git a/src/code/late-target-error.lisp b/src/code/late-target-error.lisp index 795a5a8..7c28116 100644 --- a/src/code/late-target-error.lisp +++ b/src/code/late-target-error.lisp @@ -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") ;;;; the CONDITION class @@ -247,7 +247,7 @@ (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)) @@ -642,11 +642,11 @@ (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)) @@ -657,6 +657,8 @@ (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) @@ -688,6 +690,7 @@ ;;; 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 @@ -727,7 +730,14 @@ :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) ()) @@ -753,7 +763,7 @@ "Transfer control to a restart named ABORT, signalling a CONTROL-ERROR if none exists." (invoke-restart (find-restart 'abort condition)) - ;; ABORT signals an error in case there was a restart named abort that did + ;; ABORT signals an error in case there was a restart named ABORT that did ;; not transfer control dynamically. This could happen with RESTART-BIND. (error 'abort-failure))