diff options
| author | Glenn Morris | 2012-11-10 16:37:40 -0800 |
|---|---|---|
| committer | Glenn Morris | 2012-11-10 16:37:40 -0800 |
| commit | 38868ad716a4d33a81fbaeea17fc0ee64616252c (patch) | |
| tree | 6a66de7903f6c162caf65ebeaf6ed4db33bffebc | |
| parent | 6efddf785187007804e677c3834b9d6ab18ffc86 (diff) | |
| download | emacs-38868ad716a4d33a81fbaeea17fc0ee64616252c.tar.gz emacs-38868ad716a4d33a81fbaeea17fc0ee64616252c.zip | |
Document new error symbol and function user-error
* doc/lispref/control.texi (Signaling Errors):
* doc/lispref/debugging.texi (Error Debugging):
* doc/lispref/errors.texi (Standard Errors): Add user-error.
* etc/NEWS: Related markup.
| -rw-r--r-- | doc/lispref/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/lispref/control.texi | 13 | ||||
| -rw-r--r-- | doc/lispref/debugging.texi | 12 | ||||
| -rw-r--r-- | doc/lispref/errors.texi | 3 | ||||
| -rw-r--r-- | etc/NEWS | 1 |
5 files changed, 27 insertions, 6 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 9dd833a4328..bc48f74401f 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2012-11-11 Glenn Morris <rgm@gnu.org> | 1 | 2012-11-11 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * control.texi (Signaling Errors): | ||
| 4 | * debugging.texi (Error Debugging): | ||
| 5 | * errors.texi (Standard Errors): Add user-error. | ||
| 6 | |||
| 3 | * variables.texi (Adding Generalized Variables): | 7 | * variables.texi (Adding Generalized Variables): |
| 4 | Use standard formatting for common lisp note about setf functions. | 8 | Use standard formatting for common lisp note about setf functions. |
| 5 | 9 | ||
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index cf393b59c49..489e5cc5b22 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi | |||
| @@ -824,6 +824,19 @@ The function @code{signal} never returns. | |||
| 824 | @end example | 824 | @end example |
| 825 | @end defun | 825 | @end defun |
| 826 | 826 | ||
| 827 | @cindex user errors, signaling | ||
| 828 | @defun user-error format-string &rest args | ||
| 829 | This function behaves exactly like @code{error}, except that it uses | ||
| 830 | the error symbol @code{user-error} rather than @code{error}. As the | ||
| 831 | name suggests, this is intended to report errors on the part of the | ||
| 832 | user, rather than errors in the code itself. For example, | ||
| 833 | if you try to use the command @code{Info-history-back} (@kbd{l}) to | ||
| 834 | move back beyond the start of your Info browsing history, Emacs | ||
| 835 | signals a @code{user-error}. Such errors do not cause entry to the | ||
| 836 | debugger, even when @code{debug-on-error} is non-@code{nil}. | ||
| 837 | @xref{Error Debugging}. | ||
| 838 | @end defun | ||
| 839 | |||
| 827 | @cindex CL note---no continuable errors | 840 | @cindex CL note---no continuable errors |
| 828 | @quotation | 841 | @quotation |
| 829 | @b{Common Lisp note:} Emacs Lisp has nothing like the Common Lisp | 842 | @b{Common Lisp note:} Emacs Lisp has nothing like the Common Lisp |
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 2226db942d1..74000c2ba66 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi | |||
| @@ -117,12 +117,12 @@ has any of those condition symbols, or if the error message matches | |||
| 117 | any of the regular expressions, then that error does not enter the | 117 | any of the regular expressions, then that error does not enter the |
| 118 | debugger. | 118 | debugger. |
| 119 | 119 | ||
| 120 | The normal value of this variable lists several errors that happen | 120 | The normal value of this variable includes @code{user-error}, as well |
| 121 | often during editing but rarely result from bugs in Lisp programs. | 121 | as several errors that happen often during editing but rarely result |
| 122 | However, ``rarely'' is not ``never''; if your program fails with an | 122 | from bugs in Lisp programs. However, ``rarely'' is not ``never''; if |
| 123 | error that matches this list, you may try changing this list to debug | 123 | your program fails with an error that matches this list, you may try |
| 124 | the error. The easiest way is usually to set | 124 | changing this list to debug the error. The easiest way is usually to |
| 125 | @code{debug-ignored-errors} to @code{nil}. | 125 | set @code{debug-ignored-errors} to @code{nil}. |
| 126 | @end defopt | 126 | @end defopt |
| 127 | 127 | ||
| 128 | @defopt eval-expression-debug-on-error | 128 | @defopt eval-expression-debug-on-error |
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi index a57f74d6c86..b92fd9ed665 100644 --- a/doc/lispref/errors.texi +++ b/doc/lispref/errors.texi | |||
| @@ -172,6 +172,9 @@ The message is @samp{Text is read-only}. This is a subcategory of | |||
| 172 | @item undefined-color | 172 | @item undefined-color |
| 173 | The message is @samp{Undefined color}. @xref{Color Names}. | 173 | The message is @samp{Undefined color}. @xref{Color Names}. |
| 174 | 174 | ||
| 175 | @item user-error | ||
| 176 | The message is the empty string. @xref{Signaling Errors}. | ||
| 177 | |||
| 175 | @item void-function | 178 | @item void-function |
| 176 | The message is @samp{Symbol's function definition is void}. | 179 | The message is @samp{Symbol's function definition is void}. |
| 177 | @xref{Function Cells}. | 180 | @xref{Function Cells}. |
| @@ -800,6 +800,7 @@ table, but with a different prefix. | |||
| 800 | 800 | ||
| 801 | ** Debugger changes | 801 | ** Debugger changes |
| 802 | 802 | ||
| 803 | +++ | ||
| 803 | *** New error type and new function `user-error'. | 804 | *** New error type and new function `user-error'. |
| 804 | These do not trigger the debugger. | 805 | These do not trigger the debugger. |
| 805 | 806 | ||