]> code.delx.au - gnu-emacs/blob - doc/lispref/errors.texi
Merge from trunk and resolve conflicts.
[gnu-emacs] / doc / lispref / errors.texi
1 @c -*-texinfo-*-
2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1990-1993, 1999, 2001-2013 Free Software Foundation,
4 @c Inc.
5 @c See the file elisp.texi for copying conditions.
6 @node Standard Errors
7 @appendix Standard Errors
8 @cindex standard errors
9
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.
14
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.
23
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.
26
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
34 those here.
35
36 @xref{Errors}, for an explanation of how errors are generated and
37 handled.
38
39 @table @code
40 @item error
41 The message is @samp{error}. @xref{Errors}.
42
43 @item quit
44 The message is @samp{Quit}. @xref{Quitting}.
45
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
50 @xref{Text}.
51
52 @item arith-error
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}.
56
57 @item beginning-of-buffer
58 The message is @samp{Beginning of buffer}. @xref{Character Motion}.
59
60 @item buffer-read-only
61 The message is @samp{Buffer is read-only}. @xref{Read Only Buffers}.
62
63 @item circular-list
64 The message is @samp{List contains a loop}. This happens when a
65 circular structure is encountered. @xref{Circular Objects}.
66
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
70 Extensions}.
71
72 @item coding-system-error
73 The message is @samp{Invalid coding system}. @xref{Lisp and Coding
74 Systems}.
75
76 @item cyclic-function-indirection
77 The message is @samp{Symbol's chain of function indirections contains
78 a loop}. @xref{Function Indirection}.
79
80 @item cyclic-variable-indirection
81 The message is @samp{Symbol's chain of variable indirections contains
82 a loop}. @xref{Variable Aliases}.
83
84 @item dbus-error
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}.
88
89 @item end-of-buffer
90 The message is @samp{End of buffer}. @xref{Character Motion}.
91
92 @item end-of-file
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}.
96
97 @item file-already-exists
98 This is a subcategory of @code{file-error}. @xref{Writing to Files}.
99
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}.
104
105 @item file-error
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}.
112
113 @c jka-compr.el
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}.
117
118 @c userlock.el
119 @item file-locked
120 This is a subcategory of @code{file-error}. @xref{File Locks}.
121
122 @c userlock.el
123 @item file-supersession
124 This is a subcategory of @code{file-error}. @xref{Modification Time}.
125
126 @c net/ange-ftp.el
127 @item ftp-error
128 This is a subcategory of @code{file-error}, which results from
129 problems in accessing a remote file using ftp. @xref{Remote Files,,,
130 emacs, The GNU Emacs Manual}.
131
132 @item invalid-function
133 The message is @samp{Invalid function}. @xref{Function Indirection}.
134
135 @item invalid-read-syntax
136 The message is @samp{Invalid read syntax}. @xref{Printed
137 Representation}.
138
139 @item invalid-regexp
140 The message is @samp{Invalid regexp}. @xref{Regular Expressions}.
141
142 @c simple.el
143 @item mark-inactive
144 The message is @samp{The mark is not active now}. @xref{The Mark}.
145
146 @item no-catch
147 The message is @samp{No catch for tag}. @xref{Catch and Throw}.
148
149 @ignore
150 @c Not actually used for anything? Probably definition should be removed.
151 @item protected-field
152 The message is @samp{Attempt to modify a protected file}.
153 @end ignore
154
155 @item scan-error
156 The message is @samp{Scan error}. This happens when certain
157 syntax-parsing functions find invalid syntax or mismatched
158 parentheses. @xref{List Motion}, and @xref{Parsing Expressions}.
159
160 @item search-failed
161 The message is @samp{Search failed}. @xref{Searching and Matching}.
162
163 @item setting-constant
164 The message is @samp{Attempt to set a constant symbol}. This happens
165 when attempting to assign values to @code{nil}, @code{t}, and keyword
166 symbols. @xref{Constant Variables}.
167
168 @c simple.el
169 @item text-read-only
170 The message is @samp{Text is read-only}. This is a subcategory of
171 @code{buffer-read-only}. @xref{Special Properties}.
172
173 @item undefined-color
174 The message is @samp{Undefined color}. @xref{Color Names}.
175
176 @item user-error
177 The message is the empty string. @xref{Signaling Errors}.
178
179 @item void-function
180 The message is @samp{Symbol's function definition is void}.
181 @xref{Function Cells}.
182
183 @item void-variable
184 The message is @samp{Symbol's value as variable is void}.
185 @xref{Accessing Variables}.
186
187 @item wrong-number-of-arguments
188 The message is @samp{Wrong number of arguments}. @xref{Classifying
189 Lists}.
190
191 @item wrong-type-argument
192 The message is @samp{Wrong type argument}. @xref{Type Predicates}.
193 @end table
194
195 @ignore The following seem to be unused now.
196 The following kinds of error, which are classified as special cases of
197 @code{arith-error}, can occur on certain systems for invalid use of
198 mathematical functions. @xref{Math Functions}.
199
200 @table @code
201 @item domain-error
202 The message is @samp{Arithmetic domain error}.
203
204 @item overflow-error
205 The message is @samp{Arithmetic overflow error}. This is a subcategory
206 of @code{domain-error}.
207
208 @item range-error
209 The message is @code{Arithmetic range error}.
210
211 @item singularity-error
212 The message is @samp{Arithmetic singularity error}. This is a
213 subcategory of @code{domain-error}.
214
215 @item underflow-error
216 The message is @samp{Arithmetic underflow error}. This is a
217 subcategory of @code{domain-error}.
218 @end table
219 @end ignore