X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Flate-target-error.lisp;h=7c28116490a166d1faf695760d8a5ddbdec3a242;hb=fa8962d732057015fbb9a2f8a08ea8d5299b50dd;hp=a636049ca92ccf79d28424dc73ce01cc2e68333e;hpb=b08344ddbb8d0193054b72c01be7e367422ccf03;p=sbcl.git diff --git a/src/code/late-target-error.lisp b/src/code/late-target-error.lisp index a636049..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) ())