X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcode%2Fcross-condition.lisp;h=a5f8b2bdc1597df3a09cbefc1d637075a8426bcc;hb=a3d4610158f227d53cb5eac287dd2661e975fc70;hp=a9a89ffb3119ee91fafec149c16112aac5b39b15;hpb=4b198312920a0aa77261413d5d6ff6de1131e164;p=sbcl.git
diff --git a/src/code/cross-condition.lisp b/src/code/cross-condition.lisp
index a9a89ff..a5f8b2b 100644
--- a/src/code/cross-condition.lisp
+++ b/src/code/cross-condition.lisp
@@ -16,3 +16,70 @@
;;; in the cross-compiler, this is a full warning. In the target
;;; compiler, it will only be a style-warning.
(define-condition format-too-many-args-warning (simple-warning) ())
+
+;;; KLUDGE: OAOOM warning: see condition.lisp -- we want a full
+;;; definition in the cross-compiler as well, in order to have nice
+;;; error messages instead of complaints of undefined-function
+;;; ENCAPSULATED-CONDITION.
+(define-condition encapsulated-condition (condition)
+ ((condition :initarg :condition :reader encapsulated-condition)))
+
+;;; KLUDGE: another OAOOM problem, this time to allow conditions with
+;;; REFERENCE-CONDITION in their supercondition list on the host.
+;;; (This doesn't feel like the entirely right solution, it has to be
+;;; said.) -- CSR, 2004-09-15
+(define-condition reference-condition ()
+ ((references :initarg :references :reader reference-condition-references)))
+
+;;; KLUDGE: yet another OAOOM.
+;;;
+;;; FIXME: This is clearly one OAOOM KLUDGE too many in a row. When tempted
+;;; to add another one invent DEF!CONDITION or whatever seems necessary,
+;;; and replace these.
+(define-condition type-warning (reference-condition simple-warning)
+ ()
+ (:default-initargs :references (list '(:sbcl :node "Handling of Types"))))
+(define-condition type-style-warning (reference-condition simple-style-warning)
+ ()
+ (:default-initargs :references (list '(:sbcl :node "Handling of Types"))))
+
+(define-condition bug (simple-error)
+ ()
+ (:report
+ (lambda (condition stream)
+ (format stream
+ "~@< ~? ~:@_~?~:>"
+ (simple-condition-format-control condition)
+ (simple-condition-format-arguments condition)
+ "~@.~:@>"
+ ()))))
+
+;;; OAOOM...
+(define-condition compiler-macro-keyword-problem ()
+ ((argument :initarg :argument :reader compiler-macro-keyword-argument))
+ (:report (lambda (condition stream)
+ (format stream "~@"
+ (compiler-macro-keyword-argument condition)))))
+
+;;; OAOOM...
+(define-condition duplicate-definition (reference-condition warning)
+ ((name :initarg :name :reader duplicate-definition-name))
+ (:report (lambda (c s)
+ (format s "~@"
+ (duplicate-definition-name c))))
+ (:default-initargs :references (list '(:ansi-cl :section (3 2 2 3)))))
+
+;;; These are should never be instantiated before the real definitions
+;;; come in.
+(deftype package-lock-violation () nil)
+(deftype package-locked-error () nil)
+(deftype symbol-package-locked-error () nil)