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
40 The message is @samp{error}. @xref{Errors}.
43 The message is @samp{Quit}. @xref{Quitting}.
45 @item args-out-of-range
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
52 The message is @samp{Arithmetic error}. This occurs when trying to
53 perform integer division by zero. @xref{Numeric Conversions}, and
54 @xref{Arithmetic Operations}.
56 @item beginning-of-buffer
57 The message is @samp{Beginning of buffer}. @xref{Character Motion}.
59 @item buffer-read-only
60 The message is @samp{Buffer is read-only}. @xref{Read Only Buffers}.
63 The message is @samp{List contains a loop}. This happens when a
64 circular structure is encountered. @xref{Circular Objects}.
66 @item cl-assertion-failed
67 The message is @samp{Assertion failed}. This happens when the
68 @code{cl-assert} macro fails a test. @xref{Assertions,,, cl, Common Lisp
71 @item coding-system-error
72 The message is @samp{Invalid coding system}. @xref{Lisp and Coding
75 @item cyclic-function-indirection
76 The message is @samp{Symbol's chain of function indirections contains
77 a loop}. @xref{Function Indirection}.
79 @item cyclic-variable-indirection
80 The message is @samp{Symbol's chain of variable indirections contains
81 a loop}. @xref{Variable Aliases}.
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}.
89 The message is @samp{End of buffer}. @xref{Character Motion}.
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}.
96 @item file-already-exists
97 This is a subcategory of @code{file-error}. @xref{Writing to Files}.
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
102 the output file. @xref{Changing Files}.
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,
110 the @code{error-message} property @emph{is} used. @xref{Files}.
113 @item compression-error
114 This is a subcategory of @code{file-error}, which results from
115 problems handling a compressed file. @xref{How Programs Do Loading}.
119 This is a subcategory of @code{file-error}. @xref{File Locks}.
122 @item file-supersession
123 This is a subcategory of @code{file-error}. @xref{Modification Time}.
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}.
131 @item invalid-function
132 The message is @samp{Invalid function}. @xref{Function Indirection}.
134 @item invalid-read-syntax
135 The message is @samp{Invalid read syntax}. @xref{Printed
139 The message is @samp{Invalid regexp}. @xref{Regular Expressions}.
143 The message is @samp{The mark is not active now}. @xref{The Mark}.
146 The message is @samp{No catch for tag}. @xref{Catch and Throw}.
149 @c Not actually used for anything? Probably definition should be removed.
150 @item protected-field
151 The message is @samp{Attempt to modify a protected file}.
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}.
160 The message is @samp{Search failed}. @xref{Searching and Matching}.
162 @item setting-constant
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}.
169 The message is @samp{Text is read-only}. This is a subcategory of
170 @code{buffer-read-only}. @xref{Special Properties}.
172 @item undefined-color
173 The message is @samp{Undefined color}. @xref{Color Names}.
176 The message is the empty string. @xref{Signaling Errors}.
179 The message is @samp{Symbol's function definition is void}.
180 @xref{Function Cells}.
183 The message is @samp{Symbol's value as variable is void}.
184 @xref{Accessing Variables}.
186 @item wrong-number-of-arguments
187 The message is @samp{Wrong number of arguments}. @xref{Classifying
190 @item wrong-type-argument
191 The message is @samp{Wrong type argument}. @xref{Type Predicates}.
194 @ignore The following seem to be unused now.
195 The following kinds of error, which are classified as special cases of
196 @code{arith-error}, can occur on certain systems for invalid use of
197 mathematical functions. @xref{Math Functions}.
201 The message is @samp{Arithmetic domain error}.
204 The message is @samp{Arithmetic overflow error}. This is a subcategory
205 of @code{domain-error}.
208 The message is @code{Arithmetic range error}.
210 @item singularity-error
211 The message is @samp{Arithmetic singularity error}. This is a
212 subcategory of @code{domain-error}.
214 @item underflow-error
215 The message is @samp{Arithmetic underflow error}. This is a
216 subcategory of @code{domain-error}.