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