Commit | Line | Data |
---|---|---|
b8d4c8d0 GM |
1 | @c -*-texinfo-*- |
2 | @c This is part of the GNU Emacs Lisp Reference Manual. | |
4bb82fa8 | 3 | @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. |
b8d4c8d0 | 4 | @c See the file elisp.texi for copying conditions. |
ecc6530d | 5 | @node Standard Errors |
b8d4c8d0 GM |
6 | @appendix Standard Errors |
7 | @cindex standard errors | |
8 | ||
7e05b1ec | 9 | Here is a list of the more important error symbols in standard Emacs, |
b8d4c8d0 GM |
10 | grouped by concept. The list includes each symbol's message (on the |
11 | @code{error-message} property of the symbol) and a cross reference to a | |
12 | description of how the error can occur. | |
13 | ||
14 | Each error symbol has an @code{error-conditions} property that is a | |
15 | list of symbols. Normally this list includes the error symbol itself | |
16 | and the symbol @code{error}. Occasionally it includes additional | |
17 | symbols, which are intermediate classifications, narrower than | |
18 | @code{error} but broader than a single error symbol. For example, all | |
19 | the errors in accessing files have the condition @code{file-error}. If | |
20 | we do not say here that a certain error symbol has additional error | |
21 | conditions, that means it has none. | |
22 | ||
23 | As a special exception, the error symbol @code{quit} does not have the | |
24 | condition @code{error}, because quitting is not considered an error. | |
25 | ||
7e05b1ec GM |
26 | @c You can grep for "(put 'foo 'error-conditions ...) to find |
27 | @c examples defined in Lisp. Eg soap-client.el, sasl.el. | |
28 | Most of these error symbols are defined in C (mainly @file{data.c}), | |
29 | but some are defined in Lisp. For example, the file @file{userlock.el} | |
30 | defines the @code{file-locked} and @code{file-supersession} errors. | |
31 | Several of the specialized Lisp libraries distributed with Emacs | |
32 | define their own error symbols. We do not attempt to list of all | |
33 | those here. | |
34 | ||
b8d4c8d0 GM |
35 | @xref{Errors}, for an explanation of how errors are generated and |
36 | handled. | |
37 | ||
38 | @table @code | |
b8d4c8d0 | 39 | @item error |
48de8b12 | 40 | The message is @samp{error}. @xref{Errors}. |
b8d4c8d0 GM |
41 | |
42 | @item quit | |
48de8b12 | 43 | The message is @samp{Quit}. @xref{Quitting}. |
b8d4c8d0 GM |
44 | |
45 | @item args-out-of-range | |
48de8b12 CY |
46 | The message is @samp{Args out of range}. This happens when trying to |
47 | access an element beyond the range of a sequence, buffer, or other | |
48 | container-like object. @xref{Sequences Arrays Vectors}, and | |
49 | @xref{Text}. | |
b8d4c8d0 GM |
50 | |
51 | @item arith-error | |
48de8b12 CY |
52 | The message is @samp{Arithmetic error}. This occurs when trying to |
53 | perform integer division by zero. @xref{Numeric Conversions}, and | |
b8d4c8d0 GM |
54 | @xref{Arithmetic Operations}. |
55 | ||
56 | @item beginning-of-buffer | |
48de8b12 | 57 | The message is @samp{Beginning of buffer}. @xref{Character Motion}. |
b8d4c8d0 GM |
58 | |
59 | @item buffer-read-only | |
48de8b12 | 60 | The message is @samp{Buffer is read-only}. @xref{Read Only Buffers}. |
b8d4c8d0 | 61 | |
4bb82fa8 | 62 | @item circular-list |
48de8b12 CY |
63 | The message is @samp{List contains a loop}. This happens when a |
64 | circular structure is encountered. @xref{Circular Objects}. | |
7e05b1ec GM |
65 | |
66 | @item cl-assertion-failed | |
48de8b12 CY |
67 | The message is @samp{Assertion failed}. This happens when the |
68 | @code{assert} macro fails a test. @xref{Assertions,,, cl, Common Lisp | |
69 | Extensions}. | |
4bb82fa8 | 70 | |
b8d4c8d0 | 71 | @item coding-system-error |
48de8b12 CY |
72 | The message is @samp{Invalid coding system}. @xref{Lisp and Coding |
73 | Systems}. | |
b8d4c8d0 GM |
74 | |
75 | @item cyclic-function-indirection | |
48de8b12 CY |
76 | The message is @samp{Symbol's chain of function indirections contains |
77 | a loop}. @xref{Function Indirection}. | |
b8d4c8d0 GM |
78 | |
79 | @item cyclic-variable-indirection | |
48de8b12 CY |
80 | The message is @samp{Symbol's chain of variable indirections contains |
81 | a loop}. @xref{Variable Aliases}. | |
b8d4c8d0 | 82 | |
4bb82fa8 | 83 | @item dbus-error |
48de8b12 CY |
84 | The message is @samp{D-Bus error}. This is only defined if Emacs was |
85 | compiled with D-Bus support. @xref{Errors and Events,,, dbus, D-Bus | |
86 | integration in Emacs}. | |
4bb82fa8 | 87 | |
b8d4c8d0 | 88 | @item end-of-buffer |
48de8b12 | 89 | The message is @samp{End of buffer}. @xref{Character Motion}. |
b8d4c8d0 GM |
90 | |
91 | @item end-of-file | |
48de8b12 CY |
92 | The message is @samp{End of file during parsing}. Note that this is |
93 | not a subcategory of @code{file-error}, because it pertains to the | |
94 | Lisp reader, not to file I/O. @xref{Input Functions}. | |
b8d4c8d0 GM |
95 | |
96 | @item file-already-exists | |
48de8b12 | 97 | This is a subcategory of @code{file-error}. @xref{Writing to Files}. |
b8d4c8d0 GM |
98 | |
99 | @item file-date-error | |
100 | This is a subcategory of @code{file-error}. It occurs when | |
101 | @code{copy-file} tries and fails to set the last-modification time of | |
48de8b12 | 102 | the output file. @xref{Changing Files}. |
b8d4c8d0 GM |
103 | |
104 | @item file-error | |
105 | We do not list the error-strings of this error and its subcategories, | |
106 | because the error message is normally constructed from the data items | |
107 | alone when the error condition @code{file-error} is present. Thus, | |
108 | the error-strings are not very relevant. However, these error symbols | |
109 | do have @code{error-message} properties, and if no data is provided, | |
48de8b12 | 110 | the @code{error-message} property @emph{is} used. @xref{Files}. |
b8d4c8d0 | 111 | |
7e05b1ec GM |
112 | @c jka-compr.el |
113 | @item compression-error | |
114 | This is a subcategory of @code{file-error}, which results from | |
48de8b12 | 115 | problems handling a compressed file. @xref{How Programs Do Loading}. |
7e05b1ec GM |
116 | |
117 | @c userlock.el | |
b8d4c8d0 | 118 | @item file-locked |
48de8b12 | 119 | This is a subcategory of @code{file-error}. @xref{File Locks}. |
b8d4c8d0 | 120 | |
7e05b1ec | 121 | @c userlock.el |
b8d4c8d0 | 122 | @item file-supersession |
48de8b12 | 123 | This is a subcategory of @code{file-error}. @xref{Modification Time}. |
b8d4c8d0 | 124 | |
7e05b1ec | 125 | @c net/ange-ftp.el |
b8d4c8d0 | 126 | @item ftp-error |
48de8b12 CY |
127 | This is a subcategory of @code{file-error}, which results from |
128 | problems in accessing a remote file using ftp. @xref{Remote Files,,, | |
129 | emacs, The GNU Emacs Manual}. | |
b8d4c8d0 GM |
130 | |
131 | @item invalid-function | |
48de8b12 | 132 | The message is @samp{Invalid function}. @xref{Function Indirection}. |
b8d4c8d0 GM |
133 | |
134 | @item invalid-read-syntax | |
48de8b12 CY |
135 | The message is @samp{Invalid read syntax}. @xref{Printed |
136 | Representation}. | |
b8d4c8d0 GM |
137 | |
138 | @item invalid-regexp | |
48de8b12 | 139 | The message is @samp{Invalid regexp}. @xref{Regular Expressions}. |
b8d4c8d0 | 140 | |
7e05b1ec | 141 | @c simple.el |
b8d4c8d0 | 142 | @item mark-inactive |
48de8b12 | 143 | The message is @samp{The mark is not active now}. @xref{The Mark}. |
b8d4c8d0 GM |
144 | |
145 | @item no-catch | |
48de8b12 | 146 | The message is @samp{No catch for tag}. @xref{Catch and Throw}. |
b8d4c8d0 | 147 | |
4bb82fa8 | 148 | @ignore |
7e05b1ec | 149 | @c Not actually used for anything? Probably definition should be removed. |
4bb82fa8 | 150 | @item protected-field |
735135f9 | 151 | The message is @samp{Attempt to modify a protected file}. |
4bb82fa8 GM |
152 | @end ignore |
153 | ||
b8d4c8d0 | 154 | @item scan-error |
48de8b12 CY |
155 | The message is @samp{Scan error}. This happens when certain |
156 | syntax-parsing functions find invalid syntax or mismatched | |
157 | parentheses. @xref{List Motion}, and @xref{Parsing Expressions}. | |
b8d4c8d0 GM |
158 | |
159 | @item search-failed | |
48de8b12 | 160 | The message is @samp{Search failed}. @xref{Searching and Matching}. |
b8d4c8d0 GM |
161 | |
162 | @item setting-constant | |
48de8b12 CY |
163 | The message is @samp{Attempt to set a constant symbol}. This happens |
164 | when attempting to assign values to @code{nil}, @code{t}, and keyword | |
165 | symbols. @xref{Constant Variables}. | |
b8d4c8d0 | 166 | |
7e05b1ec | 167 | @c simple.el |
b8d4c8d0 | 168 | @item text-read-only |
48de8b12 CY |
169 | The message is @samp{Text is read-only}. This is a subcategory of |
170 | @code{buffer-read-only}. @xref{Special Properties}. | |
b8d4c8d0 GM |
171 | |
172 | @item undefined-color | |
48de8b12 | 173 | The message is @samp{Undefined color}. @xref{Color Names}. |
b8d4c8d0 GM |
174 | |
175 | @item void-function | |
48de8b12 | 176 | The message is @samp{Symbol's function definition is void}. |
b8d4c8d0 GM |
177 | @xref{Function Cells}. |
178 | ||
179 | @item void-variable | |
48de8b12 | 180 | The message is @samp{Symbol's value as variable is void}. |
b8d4c8d0 GM |
181 | @xref{Accessing Variables}. |
182 | ||
183 | @item wrong-number-of-arguments | |
48de8b12 CY |
184 | The message is @samp{Wrong number of arguments}. @xref{Classifying |
185 | Lists}. | |
b8d4c8d0 GM |
186 | |
187 | @item wrong-type-argument | |
48de8b12 | 188 | The message is @samp{Wrong type argument}. @xref{Type Predicates}. |
b8d4c8d0 GM |
189 | @end table |
190 | ||
48de8b12 | 191 | @ignore The following seem to be unused now. |
4bb82fa8 | 192 | The following kinds of error, which are classified as special cases of |
b8d4c8d0 | 193 | @code{arith-error}, can occur on certain systems for invalid use of |
4bb82fa8 | 194 | mathematical functions. @xref{Math Functions}. |
b8d4c8d0 GM |
195 | |
196 | @table @code | |
197 | @item domain-error | |
48de8b12 | 198 | The message is @samp{Arithmetic domain error}. |
b8d4c8d0 GM |
199 | |
200 | @item overflow-error | |
48de8b12 CY |
201 | The message is @samp{Arithmetic overflow error}. This is a subcategory |
202 | of @code{domain-error}. | |
b8d4c8d0 GM |
203 | |
204 | @item range-error | |
48de8b12 | 205 | The message is @code{Arithmetic range error}. |
b8d4c8d0 GM |
206 | |
207 | @item singularity-error | |
735135f9 | 208 | The message is @samp{Arithmetic singularity error}. This is a |
48de8b12 | 209 | subcategory of @code{domain-error}. |
b8d4c8d0 GM |
210 | |
211 | @item underflow-error | |
48de8b12 CY |
212 | The message is @samp{Arithmetic underflow error}. This is a |
213 | subcategory of @code{domain-error}. | |
b8d4c8d0 | 214 | @end table |
48de8b12 | 215 | @end ignore |