Improve responsiveness while in 'replace-buffer-contents'
[emacs.git] / doc / lispref / errors.texi
bloba0e32c5631c3ab205f0d027d2cffb0d9b08a8fba
1 @c -*-texinfo-*-
2 @c This is part of the GNU Emacs Lisp Reference Manual.
3 @c Copyright (C) 1990-1993, 1999, 2001-2018 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
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.
14   Each error symbol has a 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.
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.
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.
33   @xref{Errors}, for an explanation of how errors are generated and
34 handled.
36 @table @code
37 @item error
38 The message is @samp{error}.  @xref{Errors}.
40 @item quit
41 The message is @samp{Quit}.  @xref{Quitting}.
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}.
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}.
54 @item beginning-of-buffer
55 The message is @samp{Beginning of buffer}.  @xref{Character Motion}.
57 @item buffer-read-only
58 The message is @samp{Buffer is read-only}.  @xref{Read Only Buffers}.
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}.
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}.
69 @item coding-system-error
70 The message is @samp{Invalid coding system}.  @xref{Lisp and Coding
71 Systems}.
73 @item cyclic-function-indirection
74 The message is @samp{Symbol's chain of function indirections contains
75 a loop}.  @xref{Function Indirection}.
77 @item cyclic-variable-indirection
78 The message is @samp{Symbol's chain of variable indirections contains
79 a loop}.  @xref{Variable Aliases}.
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}.
86 @item end-of-buffer
87 The message is @samp{End of buffer}.  @xref{Character Motion}.
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}.
94 @item file-already-exists
95 This is a subcategory of @code{file-error}.  @xref{Writing to Files}.
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}.
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}.
110 @item file-missing
111 This is a subcategory of @code{file-error}.  It occurs when an
112 operation attempts to act on a file that is missing.  @xref{Changing
113 Files}.
115 @c jka-compr.el
116 @item compression-error
117 This is a subcategory of @code{file-error}, which results from
118 problems handling a compressed file.  @xref{How Programs Do Loading}.
120 @c userlock.el
121 @item file-locked
122 This is a subcategory of @code{file-error}.  @xref{File Locks}.
124 @c userlock.el
125 @item file-supersession
126 This is a subcategory of @code{file-error}.  @xref{Modification Time}.
128 @c filenotify.el
129 @item file-notify-error
130 This is a subcategory of @code{file-error}.  It happens, when a file
131 could not be watched for changes.  @xref{File Notifications}.
133 @c net/ange-ftp.el
134 @item ftp-error
135 This is a subcategory of @code{file-error}, which results from
136 problems in accessing a remote file using ftp.  @xref{Remote Files,,,
137 emacs, The GNU Emacs Manual}.
139 @item invalid-function
140 The message is @samp{Invalid function}.  @xref{Function Indirection}.
142 @item invalid-read-syntax
143 The message is @samp{Invalid read syntax}.  @xref{Printed
144 Representation}.
146 @item invalid-regexp
147 The message is @samp{Invalid regexp}.  @xref{Regular Expressions}.
149 @c simple.el
150 @item mark-inactive
151 The message is @samp{The mark is not active now}.  @xref{The Mark}.
153 @item no-catch
154 The message is @samp{No catch for tag}.  @xref{Catch and Throw}.
156 @ignore
157 @c Not actually used for anything?  Probably definition should be removed.
158 @item protected-field
159 The message is @samp{Attempt to modify a protected file}.
160 @end ignore
162 @item scan-error
163 The message is @samp{Scan error}.  This happens when certain
164 syntax-parsing functions find invalid syntax or mismatched
165 parentheses.  Conventionally raised with three argument: a
166 human-readable error message, the start of the obstacle that cannot be
167 moved over, and the end of the obstacle.  @xref{List Motion}, and
168 @xref{Parsing Expressions}.
170 @item search-failed
171 The message is @samp{Search failed}.  @xref{Searching and Matching}.
173 @item setting-constant
174 The message is @samp{Attempt to set a constant symbol}.  This happens
175 when attempting to assign values to @code{nil}, @code{t},
176 @code{most-positive-fixnum}, @code{most-negative-fixnum}, and keyword
177 symbols.  It also happens when attempting to assign values to
178 @code{enable-multibyte-characters} and some other symbols whose direct
179 assignment is not allowed for some reason.  @xref{Constant Variables}.
181 @c simple.el
182 @item text-read-only
183 The message is @samp{Text is read-only}.  This is a subcategory of
184 @code{buffer-read-only}.  @xref{Special Properties}.
186 @item undefined-color
187 The message is @samp{Undefined color}.  @xref{Color Names}.
189 @item user-error
190 The message is the empty string.  @xref{Signaling Errors}.
192 @item user-search-failed
193 This is like @samp{search-failed}, but doesn't trigger the debugger,
194 like @samp{user-error}.  @xref{Signaling Errors}, and @xref{Searching
195 and Matching}.  This is used for searching in Info files, @xref{Search
196 Text,,,info,Info}.
198 @item void-function
199 The message is @samp{Symbol's function definition is void}.
200 @xref{Function Cells}.
202 @item void-variable
203 The message is @samp{Symbol's value as variable is void}.
204 @xref{Accessing Variables}.
206 @item wrong-number-of-arguments
207 The message is @samp{Wrong number of arguments}.  @xref{Argument List}.
209 @item wrong-type-argument
210 The message is @samp{Wrong type argument}.  @xref{Type Predicates}.
211 @end table
213 @ignore    The following seem to be unused now.
214   The following kinds of error, which are classified as special cases of
215 @code{arith-error}, can occur on certain systems for invalid use of
216 mathematical functions.  @xref{Math Functions}.
218 @table @code
219 @item domain-error
220 The message is @samp{Arithmetic domain error}.
222 @item overflow-error
223 The message is @samp{Arithmetic overflow error}.  This is a subcategory
224 of @code{domain-error}.
226 @item range-error
227 The message is @code{Arithmetic range error}.
229 @item singularity-error
230 The message is @samp{Arithmetic singularity error}.  This is a
231 subcategory of @code{domain-error}.
233 @item underflow-error
234 The message is @samp{Arithmetic underflow error}.  This is a
235 subcategory of @code{domain-error}.
236 @end table
237 @end ignore