Remove some test noise. A drop in the ocean unfortunately.
[sbcl.git] / src / code / cross-condition.lisp
bloba08ee486a6669d5245f2d987884945663064c05e
1 ;;;; cross-compiler-only versions of conditions
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; This software is derived from the CMU CL system, which was
7 ;;;; written at Carnegie Mellon University and released into the
8 ;;;; public domain. The software is in the public domain and is
9 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
10 ;;;; files for more information.
12 (in-package "SB!KERNEL")
14 (define-condition simple-style-warning (simple-condition style-warning) ())
15 (define-condition format-too-few-args-warning (simple-warning) ())
16 ;;; in the cross-compiler, this is a full warning. In the target
17 ;;; compiler, it will only be a style-warning.
18 (define-condition format-too-many-args-warning (simple-warning) ())
20 ;;; KLUDGE: OAOOM warning: see condition.lisp -- we want a full
21 ;;; definition in the cross-compiler as well, in order to have nice
22 ;;; error messages instead of complaints of undefined-function
23 ;;; ENCAPSULATED-CONDITION.
24 (define-condition encapsulated-condition (condition)
25 ((condition :initarg :condition :reader encapsulated-condition)))
27 ;;; KLUDGE: another OAOOM problem, this time to allow conditions with
28 ;;; REFERENCE-CONDITION in their supercondition list on the host.
29 ;;; (This doesn't feel like the entirely right solution, it has to be
30 ;;; said.) -- CSR, 2004-09-15
31 (define-condition reference-condition ()
32 ((references :initarg :references :reader reference-condition-references)))
34 ;;; KLUDGE: yet another OAOOM.
35 ;;;
36 ;;; FIXME: This is clearly one OAOOM KLUDGE too many in a row. When tempted
37 ;;; to add another one invent DEF!CONDITION or whatever seems necessary,
38 ;;; and replace these.
39 (define-condition type-warning (reference-condition simple-warning)
41 (:default-initargs :references (list '(:sbcl :node "Handling of Types"))))
42 (define-condition type-style-warning (reference-condition simple-style-warning)
44 (:default-initargs :references (list '(:sbcl :node "Handling of Types"))))
46 (define-condition bug (simple-error)
48 (:report
49 (lambda (condition stream)
50 (format stream
51 "~@< ~? ~:@_~?~:>"
52 (simple-condition-format-control condition)
53 (simple-condition-format-arguments condition)
54 "~@<If you see this and are an SBCL ~
55 developer, then it is probable that you have made a change to the ~
56 system that has broken the ability for SBCL to compile, usually by ~
57 removing an assumed invariant of the system, but sometimes by making ~
58 an averrance that is violated (check your code!). If you are a user, ~
59 please submit a bug report to the developers' mailing list, details of ~
60 which can be found at <http://sbcl.sourceforge.net/>.~:@>"
61 ()))))
63 ;;; OAOOM...
64 (define-condition compiler-macro-keyword-problem ()
65 ((argument :initarg :argument :reader compiler-macro-keyword-argument))
66 (:report (lambda (condition stream)
67 (format stream "~@<Argument ~S in keyword position is not ~
68 a self-evaluating symbol, preventing compiler-macro ~
69 expansion.~@:>"
70 (compiler-macro-keyword-argument condition)))))
72 ;;; OAOOM...
73 (define-condition duplicate-definition (reference-condition warning)
74 ((name :initarg :name :reader duplicate-definition-name))
75 (:report (lambda (c s)
76 (format s "~@<Duplicate definition for ~S found in ~
77 one file.~@:>"
78 (duplicate-definition-name c))))
79 (:default-initargs :references (list '(:ansi-cl :section (3 2 2 3)))))
81 ;;; These are should never be instantiated before the real definitions
82 ;;; come in.
83 (deftype package-lock-violation () nil)
84 (deftype package-locked-error () nil)
85 (deftype symbol-package-locked-error () nil)
87 ;; It goes without saying that SBCL's self-compile has cyclic dependencies,
88 ;; so naturally the cross-compiler needs to signal this warning.
89 ;; However, there is an inconsequential difference between this and the
90 ;; regular definition: SIMPLE-STYLE-WARNING is not ansi ANSI-specified class,
91 ;; so this one inherits from SIMPLE-CONDITION and STYLE-WARNING,
92 ;; both of which are specified to exist.
93 (define-condition sb!c:inlining-dependency-failure
94 (simple-condition style-warning) ())