#!+sb-package-locks
(progn
-(define-condition package-lock-violation (reference-condition package-error)
- ((format-control :initform nil :initarg :format-control
- :reader package-error-format-control)
- (format-arguments :initform nil :initarg :format-arguments
- :reader package-error-format-arguments))
+(define-condition package-lock-violation (package-error
+ reference-condition
+ simple-condition)
+ ((current-package :initform *package*
+ :reader package-lock-violation-in-package))
(:report
(lambda (condition stream)
- (let ((control (package-error-format-control condition)))
+ (let ((control (simple-condition-format-control condition))
+ (error-package (package-name (package-error-package condition)))
+ (current-package (package-name (package-lock-violation-in-package condition))))
(if control
(apply #'format stream
- (format nil "~~@<Lock on package ~A violated when ~A.~~:@>"
- (package-name (package-error-package condition))
- control)
- (package-error-format-arguments condition))
- (format stream "~@<Lock on package ~A violated.~:@>"
- (package-name (package-error-package condition)))))))
+ (format nil "~~@<Lock on package ~A violated when ~A while in package ~A.~~:@>"
+ error-package
+ control
+ current-package)
+ (simple-condition-format-arguments condition))
+ (format stream "~@<Lock on package ~A violated while in package ~A.~:@>"
+ error-package
+ current-package)))))
;; no :default-initargs -- reference-stuff provided by the
;; signalling form in target-package.lisp
#!+sb-doc
(define-condition encapsulated-condition (condition)
((condition :initarg :condition :reader encapsulated-condition)))
-(define-condition values-type-error (type-error)
- ()
- (:report
- (lambda (condition stream)
- (format stream
- "~@<The values set ~2I~:_[~{~S~^ ~}] ~I~_is not of type ~2I~_~S.~:>"
- (type-error-datum condition)
- (type-error-expected-type condition)))))
-
;;; KLUDGE: a condition for floating point errors when we can't or
;;; won't figure out what type they are. (In FreeBSD and OpenBSD we
;;; don't know how, at least as of sbcl-0.6.7; in Linux we probably