Fix typo in previous
[bpt/emacs.git] / doc / lispref / errors.texi
CommitLineData
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
11by concept. The list includes each symbol's message and a cross reference
12to 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
15list of symbols. Normally this list includes the error symbol itself
16and the symbol @code{error}. Occasionally it includes additional
17symbols, which are intermediate classifications, narrower than
18@code{error} but broader than a single error symbol. For example, all
19the errors in accessing files have the condition @code{file-error}. If
20we do not say here that a certain error symbol has additional error
21conditions, that means it has none.
22
23 As a special exception, the error symbol @code{quit} does not have the
24condition @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}),
27but some are defined in Lisp. For example, the file @file{userlock.el}
28defines the @code{file-locked} and @code{file-supersession} errors.
29Several of the specialized Lisp libraries distributed with Emacs
30define their own error symbols. We do not attempt to list of all
31those here.
32
b8d4c8d0
GM
33 @xref{Errors}, for an explanation of how errors are generated and
34handled.
35
36@table @code
b8d4c8d0 37@item error
48de8b12 38The message is @samp{error}. @xref{Errors}.
b8d4c8d0
GM
39
40@item quit
48de8b12 41The message is @samp{Quit}. @xref{Quitting}.
b8d4c8d0
GM
42
43@item args-out-of-range
48de8b12
CY
44The message is @samp{Args out of range}. This happens when trying to
45access an element beyond the range of a sequence, buffer, or other
46container-like object. @xref{Sequences Arrays Vectors}, and
47@xref{Text}.
b8d4c8d0
GM
48
49@item arith-error
48de8b12
CY
50The message is @samp{Arithmetic error}. This occurs when trying to
51perform integer division by zero. @xref{Numeric Conversions}, and
b8d4c8d0
GM
52@xref{Arithmetic Operations}.
53
54@item beginning-of-buffer
48de8b12 55The message is @samp{Beginning of buffer}. @xref{Character Motion}.
b8d4c8d0
GM
56
57@item buffer-read-only
48de8b12 58The message is @samp{Buffer is read-only}. @xref{Read Only Buffers}.
b8d4c8d0 59
4bb82fa8 60@item circular-list
48de8b12
CY
61The message is @samp{List contains a loop}. This happens when a
62circular structure is encountered. @xref{Circular Objects}.
7e05b1ec
GM
63
64@item cl-assertion-failed
48de8b12 65The message is @samp{Assertion failed}. This happens when the
0d8e94e9 66@code{cl-assert} macro fails a test. @xref{Assertions,,, cl, Common Lisp
48de8b12 67Extensions}.
4bb82fa8 68
b8d4c8d0 69@item coding-system-error
48de8b12
CY
70The message is @samp{Invalid coding system}. @xref{Lisp and Coding
71Systems}.
b8d4c8d0
GM
72
73@item cyclic-function-indirection
48de8b12
CY
74The message is @samp{Symbol's chain of function indirections contains
75a loop}. @xref{Function Indirection}.
b8d4c8d0
GM
76
77@item cyclic-variable-indirection
48de8b12
CY
78The message is @samp{Symbol's chain of variable indirections contains
79a loop}. @xref{Variable Aliases}.
b8d4c8d0 80
4bb82fa8 81@item dbus-error
48de8b12
CY
82The message is @samp{D-Bus error}. This is only defined if Emacs was
83compiled with D-Bus support. @xref{Errors and Events,,, dbus, D-Bus
84integration in Emacs}.
4bb82fa8 85
b8d4c8d0 86@item end-of-buffer
48de8b12 87The message is @samp{End of buffer}. @xref{Character Motion}.
b8d4c8d0
GM
88
89@item end-of-file
48de8b12
CY
90The message is @samp{End of file during parsing}. Note that this is
91not a subcategory of @code{file-error}, because it pertains to the
1df7defd 92Lisp reader, not to file I/O@. @xref{Input Functions}.
b8d4c8d0
GM
93
94@item file-already-exists
48de8b12 95This is a subcategory of @code{file-error}. @xref{Writing to Files}.
b8d4c8d0
GM
96
97@item file-date-error
98This 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 100the output file. @xref{Changing Files}.
b8d4c8d0
GM
101
102@item file-error
103We do not list the error-strings of this error and its subcategories,
104because the error message is normally constructed from the data items
105alone when the error condition @code{file-error} is present. Thus,
106the error-strings are not very relevant. However, these error symbols
107do have @code{error-message} properties, and if no data is provided,
48de8b12 108the @code{error-message} property @emph{is} used. @xref{Files}.
b8d4c8d0 109
7e05b1ec
GM
110@c jka-compr.el
111@item compression-error
112This is a subcategory of @code{file-error}, which results from
48de8b12 113problems handling a compressed file. @xref{How Programs Do Loading}.
7e05b1ec
GM
114
115@c userlock.el
b8d4c8d0 116@item file-locked
48de8b12 117This is a subcategory of @code{file-error}. @xref{File Locks}.
b8d4c8d0 118
7e05b1ec 119@c userlock.el
b8d4c8d0 120@item file-supersession
48de8b12 121This is a subcategory of @code{file-error}. @xref{Modification Time}.
b8d4c8d0 122
32813ea7
MA
123@c filenotify.el
124@item file-notify-error
125This is a subcategory of @code{file-error}. It happens, when a file
95e6e62b 126could not be watched for changes. @xref{File Notifications}.
32813ea7 127
7e05b1ec 128@c net/ange-ftp.el
b8d4c8d0 129@item ftp-error
48de8b12
CY
130This is a subcategory of @code{file-error}, which results from
131problems in accessing a remote file using ftp. @xref{Remote Files,,,
132emacs, The GNU Emacs Manual}.
b8d4c8d0
GM
133
134@item invalid-function
48de8b12 135The message is @samp{Invalid function}. @xref{Function Indirection}.
b8d4c8d0
GM
136
137@item invalid-read-syntax
48de8b12
CY
138The message is @samp{Invalid read syntax}. @xref{Printed
139Representation}.
b8d4c8d0
GM
140
141@item invalid-regexp
48de8b12 142The message is @samp{Invalid regexp}. @xref{Regular Expressions}.
b8d4c8d0 143
7e05b1ec 144@c simple.el
b8d4c8d0 145@item mark-inactive
48de8b12 146The message is @samp{The mark is not active now}. @xref{The Mark}.
b8d4c8d0
GM
147
148@item no-catch
48de8b12 149The 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 154The message is @samp{Attempt to modify a protected file}.
4bb82fa8
GM
155@end ignore
156
b8d4c8d0 157@item scan-error
48de8b12
CY
158The message is @samp{Scan error}. This happens when certain
159syntax-parsing functions find invalid syntax or mismatched
160parentheses. @xref{List Motion}, and @xref{Parsing Expressions}.
b8d4c8d0
GM
161
162@item search-failed
48de8b12 163The message is @samp{Search failed}. @xref{Searching and Matching}.
b8d4c8d0
GM
164
165@item setting-constant
48de8b12
CY
166The message is @samp{Attempt to set a constant symbol}. This happens
167when attempting to assign values to @code{nil}, @code{t}, and keyword
168symbols. @xref{Constant Variables}.
b8d4c8d0 169
7e05b1ec 170@c simple.el
b8d4c8d0 171@item text-read-only
48de8b12
CY
172The 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 176The message is @samp{Undefined color}. @xref{Color Names}.
b8d4c8d0 177
38868ad7
GM
178@item user-error
179The message is the empty string. @xref{Signaling Errors}.
180
b8d4c8d0 181@item void-function
48de8b12 182The message is @samp{Symbol's function definition is void}.
b8d4c8d0
GM
183@xref{Function Cells}.
184
185@item void-variable
48de8b12 186The 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
190The message is @samp{Wrong number of arguments}. @xref{Classifying
191Lists}.
b8d4c8d0
GM
192
193@item wrong-type-argument
48de8b12 194The 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 200mathematical functions. @xref{Math Functions}.
b8d4c8d0
GM
201
202@table @code
203@item domain-error
48de8b12 204The message is @samp{Arithmetic domain error}.
b8d4c8d0
GM
205
206@item overflow-error
48de8b12
CY
207The message is @samp{Arithmetic overflow error}. This is a subcategory
208of @code{domain-error}.
b8d4c8d0
GM
209
210@item range-error
48de8b12 211The message is @code{Arithmetic range error}.
b8d4c8d0
GM
212
213@item singularity-error
735135f9 214The message is @samp{Arithmetic singularity error}. This is a
48de8b12 215subcategory of @code{domain-error}.
b8d4c8d0
GM
216
217@item underflow-error
48de8b12
CY
218The message is @samp{Arithmetic underflow error}. This is a
219subcategory of @code{domain-error}.
b8d4c8d0 220@end table
48de8b12 221@end ignore