2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1990-1993, 1999, 2001-2013 Free Software Foundation,
5 @c See the file elisp.texi for copying conditions.
7 @appendix Standard Errors
8 @cindex standard errors
10 Here is a list of the more important error symbols in standard Emacs,
11 grouped by concept. The list includes each symbol's message (on the
12 @code{error-message} property of the symbol) and a cross reference to a
13 description of how the error can occur.
15 Each error symbol has an @code{error-conditions} property that is a
16 list of symbols. Normally this list includes the error symbol itself
17 and the symbol @code{error}. Occasionally it includes additional
18 symbols, which are intermediate classifications, narrower than
19 @code{error} but broader than a single error symbol. For example, all
20 the errors in accessing files have the condition @code{file-error}. If
21 we do not say here that a certain error symbol has additional error
22 conditions, that means it has none.
24 As a special exception, the error symbol @code{quit} does not have the
25 condition @code{error}, because quitting is not considered an error.
27 @c You can grep for "(put 'foo 'error-conditions ...) to find
28 @c examples defined in Lisp. E.g., soap-client.el, sasl.el.
29 Most of these error symbols are defined in C (mainly @file{data.c}),
30 but some are defined in Lisp. For example, the file @file{userlock.el}
31 defines the @code{file-locked} and @code{file-supersession} errors.
32 Several of the specialized Lisp libraries distributed with Emacs
33 define their own error symbols. We do not attempt to list of all
36 @xref{Errors}, for an explanation of how errors are generated and
41 The message is @samp{error}. @xref{Errors}.
44 The message is @samp{Quit}. @xref{Quitting}.
46 @item args-out-of-range
47 The message is @samp{Args out of range}. This happens when trying to
48 access an element beyond the range of a sequence, buffer, or other
49 container-like object. @xref{Sequences Arrays Vectors}, and
53 The message is @samp{Arithmetic error}. This occurs when trying to
54 perform integer division by zero. @xref{Numeric Conversions}, and
55 @xref{Arithmetic Operations}.
57 @item beginning-of-buffer
58 The message is @samp{Beginning of buffer}. @xref{Character Motion}.
60 @item buffer-read-only
61 The message is @samp{Buffer is read-only}. @xref{Read Only Buffers}.
64 The message is @samp{List contains a loop}. This happens when a
65 circular structure is encountered. @xref{Circular Objects}.
67 @item cl-assertion-failed
68 The message is @samp{Assertion failed}. This happens when the
69 @code{cl-assert} macro fails a test. @xref{Assertions,,, cl, Common Lisp
72 @item coding-system-error
73 The message is @samp{Invalid coding system}. @xref{Lisp and Coding
76 @item cyclic-function-indirection
77 The message is @samp{Symbol's chain of function indirections contains
78 a loop}. @xref{Function Indirection}.
80 @item cyclic-variable-indirection
81 The message is @samp{Symbol's chain of variable indirections contains
82 a loop}. @xref{Variable Aliases}.
85 The message is @samp{D-Bus error}. This is only defined if Emacs was
86 compiled with D-Bus support. @xref{Errors and Events,,, dbus, D-Bus
87 integration in Emacs}.
90 The message is @samp{End of buffer}. @xref{Character Motion}.
93 The message is @samp{End of file during parsing}. Note that this is
94 not a subcategory of @code{file-error}, because it pertains to the
95 Lisp reader, not to file I/O@. @xref{Input Functions}.
97 @item file-already-exists
98 This is a subcategory of @code{file-error}. @xref{Writing to Files}.
100 @item file-date-error
101 This is a subcategory of @code{file-error}. It occurs when
102 @code{copy-file} tries and fails to set the last-modification time of
103 the output file. @xref{Changing Files}.
106 We do not list the error-strings of this error and its subcategories,
107 because the error message is normally constructed from the data items
108 alone when the error condition @code{file-error} is present. Thus,
109 the error-strings are not very relevant. However, these error symbols
110 do have @code{error-message} properties, and if no data is provided,
111 the @code{error-message} property @emph{is} used. @xref{Files}.
114 @item compression-error
115 This is a subcategory of @code{file-error}, which results from
116 problems handling a compressed file. @xref{How Programs Do Loading}.
120 This is a subcategory of @code{file-error}. @xref{File Locks}.
123 @item file-supersession
124 This is a subcategory of @code{file-error}. @xref{Modification Time}.
128 This is a subcategory of @code{file-error}, which results from
129 problems in accessing a remote file using ftp. @xref{Remote Files,,,
130 emacs, The GNU Emacs Manual}.
132 @item invalid-function
133 The message is @samp{Invalid function}. @xref{Function Indirection}.
135 @item invalid-read-syntax
136 The message is @samp{Invalid read syntax}. @xref{Printed
140 The message is @samp{Invalid regexp}. @xref{Regular Expressions}.
144 The message is @samp{The mark is not active now}. @xref{The Mark}.
147 The message is @samp{No catch for tag}. @xref{Catch and Throw}.
150 @c Not actually used for anything? Probably definition should be removed.
151 @item protected-field
152 The message is @samp{Attempt to modify a protected file}.
156 The message is @samp{Scan error}. This happens when certain
157 syntax-parsing functions find invalid syntax or mismatched
158 parentheses. @xref{List Motion}, and @xref{Parsing Expressions}.
161 The message is @samp{Search failed}. @xref{Searching and Matching}.
163 @item setting-constant
164 The message is @samp{Attempt to set a constant symbol}. This happens
165 when attempting to assign values to @code{nil}, @code{t}, and keyword
166 symbols. @xref{Constant Variables}.
170 The message is @samp{Text is read-only}. This is a subcategory of
171 @code{buffer-read-only}. @xref{Special Properties}.
173 @item undefined-color
174 The message is @samp{Undefined color}. @xref{Color Names}.
177 The message is the empty string. @xref{Signaling Errors}.
180 The message is @samp{Symbol's function definition is void}.
181 @xref{Function Cells}.
184 The message is @samp{Symbol's value as variable is void}.
185 @xref{Accessing Variables}.
187 @item wrong-number-of-arguments
188 The message is @samp{Wrong number of arguments}. @xref{Classifying
191 @item wrong-type-argument
192 The message is @samp{Wrong type argument}. @xref{Type Predicates}.
195 @ignore The following seem to be unused now.
196 The following kinds of error, which are classified as special cases of
197 @code{arith-error}, can occur on certain systems for invalid use of
198 mathematical functions. @xref{Math Functions}.
202 The message is @samp{Arithmetic domain error}.
205 The message is @samp{Arithmetic overflow error}. This is a subcategory
206 of @code{domain-error}.
209 The message is @code{Arithmetic range error}.
211 @item singularity-error
212 The message is @samp{Arithmetic singularity error}. This is a
213 subcategory of @code{domain-error}.
215 @item underflow-error
216 The message is @samp{Arithmetic underflow error}. This is a
217 subcategory of @code{domain-error}.