Spelling fixes.
[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.
4bb82fa8 3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc.
b8d4c8d0 4@c See the file elisp.texi for copying conditions.
ecc6530d 5@node Standard Errors
b8d4c8d0
GM
6@appendix Standard Errors
7@cindex standard errors
8
7e05b1ec 9 Here is a list of the more important error symbols in standard Emacs,
b8d4c8d0
GM
10grouped 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
12description of how the error can occur.
13
14 Each error symbol has an @code{error-conditions} property that is a
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@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}),
29but some are defined in Lisp. For example, the file @file{userlock.el}
30defines the @code{file-locked} and @code{file-supersession} errors.
31Several of the specialized Lisp libraries distributed with Emacs
32define their own error symbols. We do not attempt to list of all
33those here.
34
b8d4c8d0
GM
35 @xref{Errors}, for an explanation of how errors are generated and
36handled.
37
38@table @code
b8d4c8d0 39@item error
48de8b12 40The message is @samp{error}. @xref{Errors}.
b8d4c8d0
GM
41
42@item quit
48de8b12 43The message is @samp{Quit}. @xref{Quitting}.
b8d4c8d0
GM
44
45@item args-out-of-range
48de8b12
CY
46The message is @samp{Args out of range}. This happens when trying to
47access an element beyond the range of a sequence, buffer, or other
48container-like object. @xref{Sequences Arrays Vectors}, and
49@xref{Text}.
b8d4c8d0
GM
50
51@item arith-error
48de8b12
CY
52The message is @samp{Arithmetic error}. This occurs when trying to
53perform integer division by zero. @xref{Numeric Conversions}, and
b8d4c8d0
GM
54@xref{Arithmetic Operations}.
55
56@item beginning-of-buffer
48de8b12 57The message is @samp{Beginning of buffer}. @xref{Character Motion}.
b8d4c8d0
GM
58
59@item buffer-read-only
48de8b12 60The message is @samp{Buffer is read-only}. @xref{Read Only Buffers}.
b8d4c8d0 61
4bb82fa8 62@item circular-list
48de8b12
CY
63The message is @samp{List contains a loop}. This happens when a
64circular structure is encountered. @xref{Circular Objects}.
7e05b1ec
GM
65
66@item cl-assertion-failed
48de8b12
CY
67The message is @samp{Assertion failed}. This happens when the
68@code{assert} macro fails a test. @xref{Assertions,,, cl, Common Lisp
69Extensions}.
4bb82fa8 70
b8d4c8d0 71@item coding-system-error
48de8b12
CY
72The message is @samp{Invalid coding system}. @xref{Lisp and Coding
73Systems}.
b8d4c8d0
GM
74
75@item cyclic-function-indirection
48de8b12
CY
76The message is @samp{Symbol's chain of function indirections contains
77a loop}. @xref{Function Indirection}.
b8d4c8d0
GM
78
79@item cyclic-variable-indirection
48de8b12
CY
80The message is @samp{Symbol's chain of variable indirections contains
81a loop}. @xref{Variable Aliases}.
b8d4c8d0 82
4bb82fa8 83@item dbus-error
48de8b12
CY
84The message is @samp{D-Bus error}. This is only defined if Emacs was
85compiled with D-Bus support. @xref{Errors and Events,,, dbus, D-Bus
86integration in Emacs}.
4bb82fa8 87
b8d4c8d0 88@item end-of-buffer
48de8b12 89The message is @samp{End of buffer}. @xref{Character Motion}.
b8d4c8d0
GM
90
91@item end-of-file
48de8b12
CY
92The message is @samp{End of file during parsing}. Note that this is
93not a subcategory of @code{file-error}, because it pertains to the
94Lisp reader, not to file I/O. @xref{Input Functions}.
b8d4c8d0
GM
95
96@item file-already-exists
48de8b12 97This is a subcategory of @code{file-error}. @xref{Writing to Files}.
b8d4c8d0
GM
98
99@item file-date-error
100This is a subcategory of @code{file-error}. It occurs when
101@code{copy-file} tries and fails to set the last-modification time of
48de8b12 102the output file. @xref{Changing Files}.
b8d4c8d0
GM
103
104@item file-error
105We do not list the error-strings of this error and its subcategories,
106because the error message is normally constructed from the data items
107alone when the error condition @code{file-error} is present. Thus,
108the error-strings are not very relevant. However, these error symbols
109do have @code{error-message} properties, and if no data is provided,
48de8b12 110the @code{error-message} property @emph{is} used. @xref{Files}.
b8d4c8d0 111
7e05b1ec
GM
112@c jka-compr.el
113@item compression-error
114This is a subcategory of @code{file-error}, which results from
48de8b12 115problems handling a compressed file. @xref{How Programs Do Loading}.
7e05b1ec
GM
116
117@c userlock.el
b8d4c8d0 118@item file-locked
48de8b12 119This is a subcategory of @code{file-error}. @xref{File Locks}.
b8d4c8d0 120
7e05b1ec 121@c userlock.el
b8d4c8d0 122@item file-supersession
48de8b12 123This is a subcategory of @code{file-error}. @xref{Modification Time}.
b8d4c8d0 124
7e05b1ec 125@c net/ange-ftp.el
b8d4c8d0 126@item ftp-error
48de8b12
CY
127This is a subcategory of @code{file-error}, which results from
128problems in accessing a remote file using ftp. @xref{Remote Files,,,
129emacs, The GNU Emacs Manual}.
b8d4c8d0
GM
130
131@item invalid-function
48de8b12 132The message is @samp{Invalid function}. @xref{Function Indirection}.
b8d4c8d0
GM
133
134@item invalid-read-syntax
48de8b12
CY
135The message is @samp{Invalid read syntax}. @xref{Printed
136Representation}.
b8d4c8d0
GM
137
138@item invalid-regexp
48de8b12 139The message is @samp{Invalid regexp}. @xref{Regular Expressions}.
b8d4c8d0 140
7e05b1ec 141@c simple.el
b8d4c8d0 142@item mark-inactive
48de8b12 143The message is @samp{The mark is not active now}. @xref{The Mark}.
b8d4c8d0
GM
144
145@item no-catch
48de8b12 146The message is @samp{No catch for tag}. @xref{Catch and Throw}.
b8d4c8d0 147
4bb82fa8 148@ignore
7e05b1ec 149@c Not actually used for anything? Probably definition should be removed.
4bb82fa8 150@item protected-field
735135f9 151The message is @samp{Attempt to modify a protected file}.
4bb82fa8
GM
152@end ignore
153
b8d4c8d0 154@item scan-error
48de8b12
CY
155The message is @samp{Scan error}. This happens when certain
156syntax-parsing functions find invalid syntax or mismatched
157parentheses. @xref{List Motion}, and @xref{Parsing Expressions}.
b8d4c8d0
GM
158
159@item search-failed
48de8b12 160The message is @samp{Search failed}. @xref{Searching and Matching}.
b8d4c8d0
GM
161
162@item setting-constant
48de8b12
CY
163The message is @samp{Attempt to set a constant symbol}. This happens
164when attempting to assign values to @code{nil}, @code{t}, and keyword
165symbols. @xref{Constant Variables}.
b8d4c8d0 166
7e05b1ec 167@c simple.el
b8d4c8d0 168@item text-read-only
48de8b12
CY
169The message is @samp{Text is read-only}. This is a subcategory of
170@code{buffer-read-only}. @xref{Special Properties}.
b8d4c8d0
GM
171
172@item undefined-color
48de8b12 173The message is @samp{Undefined color}. @xref{Color Names}.
b8d4c8d0
GM
174
175@item void-function
48de8b12 176The message is @samp{Symbol's function definition is void}.
b8d4c8d0
GM
177@xref{Function Cells}.
178
179@item void-variable
48de8b12 180The message is @samp{Symbol's value as variable is void}.
b8d4c8d0
GM
181@xref{Accessing Variables}.
182
183@item wrong-number-of-arguments
48de8b12
CY
184The message is @samp{Wrong number of arguments}. @xref{Classifying
185Lists}.
b8d4c8d0
GM
186
187@item wrong-type-argument
48de8b12 188The message is @samp{Wrong type argument}. @xref{Type Predicates}.
b8d4c8d0
GM
189@end table
190
48de8b12 191@ignore The following seem to be unused now.
4bb82fa8 192 The following kinds of error, which are classified as special cases of
b8d4c8d0 193@code{arith-error}, can occur on certain systems for invalid use of
4bb82fa8 194mathematical functions. @xref{Math Functions}.
b8d4c8d0
GM
195
196@table @code
197@item domain-error
48de8b12 198The message is @samp{Arithmetic domain error}.
b8d4c8d0
GM
199
200@item overflow-error
48de8b12
CY
201The message is @samp{Arithmetic overflow error}. This is a subcategory
202of @code{domain-error}.
b8d4c8d0
GM
203
204@item range-error
48de8b12 205The message is @code{Arithmetic range error}.
b8d4c8d0
GM
206
207@item singularity-error
735135f9 208The message is @samp{Arithmetic singularity error}. This is a
48de8b12 209subcategory of @code{domain-error}.
b8d4c8d0
GM
210
211@item underflow-error
48de8b12
CY
212The message is @samp{Arithmetic underflow error}. This is a
213subcategory of @code{domain-error}.
b8d4c8d0 214@end table
48de8b12 215@end ignore