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