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}.
127 @item file-notify-error
128 This is a subcategory of @code{file-error}. It happens, when a file
129 could not be set to be watched for changes. @xref{File Notifications}.
133 This is a subcategory of @code{file-error}, which results from
134 problems in accessing a remote file using ftp. @xref{Remote Files,,,
135 emacs, The GNU Emacs Manual}.
137 @item invalid-function
138 The message is @samp{Invalid function}. @xref{Function Indirection}.
140 @item invalid-read-syntax
141 The message is @samp{Invalid read syntax}. @xref{Printed
145 The message is @samp{Invalid regexp}. @xref{Regular Expressions}.
149 The message is @samp{The mark is not active now}. @xref{The Mark}.
152 The message is @samp{No catch for tag}. @xref{Catch and Throw}.
155 @c Not actually used for anything? Probably definition should be removed.
156 @item protected-field
157 The message is @samp{Attempt to modify a protected file}.
161 The message is @samp{Scan error}. This happens when certain
162 syntax-parsing functions find invalid syntax or mismatched
163 parentheses. @xref{List Motion}, and @xref{Parsing Expressions}.
166 The message is @samp{Search failed}. @xref{Searching and Matching}.
168 @item setting-constant
169 The message is @samp{Attempt to set a constant symbol}. This happens
170 when attempting to assign values to @code{nil}, @code{t}, and keyword
171 symbols. @xref{Constant Variables}.
175 The message is @samp{Text is read-only}. This is a subcategory of
176 @code{buffer-read-only}. @xref{Special Properties}.
178 @item undefined-color
179 The message is @samp{Undefined color}. @xref{Color Names}.
182 The message is the empty string. @xref{Signaling Errors}.
185 The message is @samp{Symbol's function definition is void}.
186 @xref{Function Cells}.
189 The message is @samp{Symbol's value as variable is void}.
190 @xref{Accessing Variables}.
192 @item wrong-number-of-arguments
193 The message is @samp{Wrong number of arguments}. @xref{Classifying
196 @item wrong-type-argument
197 The message is @samp{Wrong type argument}. @xref{Type Predicates}.
200 @ignore The following seem to be unused now.
201 The following kinds of error, which are classified as special cases of
202 @code{arith-error}, can occur on certain systems for invalid use of
203 mathematical functions. @xref{Math Functions}.
207 The message is @samp{Arithmetic domain error}.
210 The message is @samp{Arithmetic overflow error}. This is a subcategory
211 of @code{domain-error}.
214 The message is @code{Arithmetic range error}.
216 @item singularity-error
217 The message is @samp{Arithmetic singularity error}. This is a
218 subcategory of @code{domain-error}.
220 @item underflow-error
221 The message is @samp{Arithmetic underflow error}. This is a
222 subcategory of @code{domain-error}.