errors.texi 7.6 KB

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