1.0.9.48: texi2pdf rework (Aymeric Vincent sbcl-devel 2007-09-05)
[sbcl/lichteblau.git] / src / code / cross-condition.lisp
blobcd8580c7dd9deba8fcc1fad062f96f72650f171d
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"))))
43 (define-condition bug (simple-error)
45 (:report
46 (lambda (condition stream)
47 (format stream
48 "~@< ~? ~:@_~?~:>"
49 (simple-condition-format-control condition)
50 (simple-condition-format-arguments condition)
51 "~@<If you see this and are an SBCL ~
52 developer, then it is probable that you have made a change to the ~
53 system that has broken the ability for SBCL to compile, usually by ~
54 removing an assumed invariant of the system, but sometimes by making ~
55 an averrance that is violated (check your code!). If you are a user, ~
56 please submit a bug report to the developers' mailing list, details of ~
57 which can be found at <http://sbcl.sourceforge.net/>.~:@>"
58 ()))))
60 ;;; These are should never be instantiated before the real definitions
61 ;;; come in.
62 (deftype package-lock-violation () nil)
63 (deftype package-locked-error () nil)
64 (deftype symbol-package-locked-error () nil)