e74fc3c2f4c55f38d2236a20e0d42ace68ab91af
[sbcl.git] / src / code / cross-condition.lisp
1 ;;;; cross-compiler-only versions of conditions
2
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.
11
12 (in-package "SB!KERNEL")
13
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) ())
19
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)))
26
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)))
33
34 (define-condition bug (simple-error)
35   ()
36   (:report
37    (lambda (condition stream)
38      (format stream
39              "~@<  ~? ~:@_~?~:>"
40              (simple-condition-format-control condition)
41              (simple-condition-format-arguments condition)
42              "~@<If you see this and are an SBCL ~
43 developer, then it is probable that you have made a change to the ~
44 system that has broken the ability for SBCL to compile, usually by ~
45 removing an assumed invariant of the system, but sometimes by making ~
46 an averrance that is violated (check your code!). If you are a user, ~
47 please submit a bug report to the developers' mailing list, details of ~
48 which can be found at <http://sbcl.sourceforge.net/>.~:@>"
49              ()))))
50
51 ;;; These are should never be instantiated before the real definitions
52 ;;; come in.
53 (deftype package-lock-violation () nil)
54 (deftype package-locked-error () nil)
55 (deftype symbol-package-locked-error () nil)