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