2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc.
4 @c See the file elisp.texi for copying conditions.
6 @appendix Standard Errors
7 @cindex standard errors
9 Here is a list of the more important error symbols in standard Emacs,
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.
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.
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.
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
35 @xref{Errors}, for an explanation of how errors are generated and
47 @item args-out-of-range
48 @code{"Args out of range"}@*
49 This happens when trying to access an element beyond the range of a
51 @xref{Sequences Arrays Vectors}, @xref{Text}.
54 @code{"Arithmetic error"}@*
55 @xref{Arithmetic Operations}.
57 @item beginning-of-buffer
58 @code{"Beginning of buffer"}@*
59 @xref{Character Motion}.
61 @item buffer-read-only
62 @code{"Buffer is read-only"}@*
63 @xref{Read Only Buffers}.
66 @code{"List contains a loop"}@*
67 This happens when some operations (e.g. resolving face names)
68 encounter circular structures.@*
69 @xref{Circular Objects}.
71 @item cl-assertion-failed
72 @code{"Assertion failed"}@*
73 This happens when the @code{assert} macro fails a test.@*
74 @xref{Assertions,,, cl, Common Lisp Extensions}.
76 @item coding-system-error
77 @code{"Invalid coding system"}@*
78 @xref{Lisp and Coding Systems}.
80 @item cyclic-function-indirection
81 @code{"Symbol's chain of function indirections contains a loop"}@*
82 @xref{Function Indirection}.
84 @item cyclic-variable-indirection
85 @code{"Symbol's chain of variable indirections contains a loop"}@*
86 @xref{Variable Aliases}.
89 @code{"D-Bus error"}@*
90 This is only defined if Emacs was compiled with D-Bus support.@*
91 @xref{Errors and Events,,, dbus, D-Bus integration in Emacs}.
94 @code{"End of buffer"}@*
95 @xref{Character Motion}.
98 @code{"End of file during parsing"}@*
99 Note that this is not a subcategory of @code{file-error},
100 because it pertains to the Lisp reader, not to file I/O.@*
101 @xref{Input Functions}.
103 @item file-already-exists
104 This is a subcategory of @code{file-error}.@*
105 @xref{Writing to Files}.
107 @item file-date-error
108 This is a subcategory of @code{file-error}. It occurs when
109 @code{copy-file} tries and fails to set the last-modification time of
111 @xref{Changing Files}.
114 We do not list the error-strings of this error and its subcategories,
115 because the error message is normally constructed from the data items
116 alone when the error condition @code{file-error} is present. Thus,
117 the error-strings are not very relevant. However, these error symbols
118 do have @code{error-message} properties, and if no data is provided,
119 the @code{error-message} property @emph{is} used.@*
123 @item compression-error
124 This is a subcategory of @code{file-error}, which results from
125 problems handling a compressed file.@*
126 @xref{How Programs Do Loading}.
130 This is a subcategory of @code{file-error}.@*
134 @item file-supersession
135 This is a subcategory of @code{file-error}.@*
136 @xref{Modification Time}.
140 This is a subcategory of @code{file-error}, which results from problems
141 in accessing a remote file using ftp.@*
142 @xref{Remote Files,,, emacs, The GNU Emacs Manual}.
144 @item invalid-function
145 @code{"Invalid function"}@*
146 @xref{Function Indirection}.
148 @item invalid-read-syntax
149 @code{"Invalid read syntax"}@*
150 @xref{Printed Representation}.
153 @code{"Invalid regexp"}@*
154 @xref{Regular Expressions}.
158 @code{"The mark is not active now"}@*
162 @code{"No catch for tag"}@*
163 @xref{Catch and Throw}.
166 @c Not actually used for anything? Probably definition should be removed.
167 @item protected-field
168 @code{"Attempt to modify a protected field"}
172 @code{"Scan error"}@*
173 This happens when certain syntax-parsing functions
174 find invalid syntax or mismatched parentheses.@*
175 @xref{List Motion}, and @ref{Parsing Expressions}.
178 @code{"Search failed"}@*
179 @xref{Searching and Matching}.
181 @item setting-constant
182 @code{"Attempt to set a constant symbol"}@*
183 The values of the symbols @code{nil} and @code{t},
184 and any symbols that start with @samp{:},
185 may not be changed.@*
186 @xref{Constant Variables, , Variables that Never Change}.
190 @code{"Text is read-only"}@*
191 This is a subcategory of @code{buffer-read-only}.@*
192 @xref{Special Properties}.
194 @item undefined-color
195 @code{"Undefined color"}@*
199 @code{"Symbol's function definition is void"}@*
200 @xref{Function Cells}.
203 @code{"Symbol's value as variable is void"}@*
204 @xref{Accessing Variables}.
206 @item wrong-number-of-arguments
207 @code{"Wrong number of arguments"}@*
208 @xref{Classifying Lists}.
210 @item wrong-type-argument
211 @code{"Wrong type argument"}@*
212 @xref{Type Predicates}.
215 The following kinds of error, which are classified as special cases of
216 @code{arith-error}, can occur on certain systems for invalid use of
217 mathematical functions. @xref{Math Functions}.
221 @code{"Arithmetic domain error"}
224 @code{"Arithmetic overflow error"}@*
225 This is a subcategory of @code{domain-error}.
228 @code{"Arithmetic range error"}
230 @item singularity-error
231 @code{"Arithmetic singularity error"}@*
232 This is a subcategory of @code{domain-error}.
234 @item underflow-error
235 @code{"Arithmetic underflow error"}@*
236 This is a subcategory of @code{domain-error}.