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