changeset 107754:c065a9e361c6

Explain how to re-throw a signal. control.texi (Handling Errors): How to re-throw a signal caught by condition-case.
author Eli Zaretskii <eliz@gnu.org>
date Wed, 31 Mar 2010 12:43:53 +0300
parents 3153ca396956
children 6143a02fedce
files doc/lispref/ChangeLog doc/lispref/control.texi
diffstat 2 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/lispref/ChangeLog	Wed Mar 31 12:08:40 2010 +0300
+++ b/doc/lispref/ChangeLog	Wed Mar 31 12:43:53 2010 +0300
@@ -1,3 +1,8 @@
+2010-03-31  Eli Zaretskii  <eliz@gnu.org>
+
+	* control.texi (Handling Errors): How to re-throw a signal caught
+	by condition-case.
+
 2010-03-26  Chong Yidong  <cyd@stupidchicken.com>
 
 	* loading.texi (Hooks for Loading): Document after-load-functions.
--- a/doc/lispref/control.texi	Wed Mar 31 12:08:40 2010 +0300
+++ b/doc/lispref/control.texi	Wed Mar 31 12:43:53 2010 +0300
@@ -1023,6 +1023,20 @@
 
 If @var{var} is @code{nil}, that means no variable is bound.  Then the
 error symbol and associated data are not available to the handler.
+
+@cindex rethrow a signal
+Sometimes it is necessary to re-throw a signal caught by
+@code{condition-case}, for some outer-level handler to catch.  Here's
+how to do that:
+
+@smallexample
+  (signal (car err) (cdr err))
+@end smallexample
+
+@noindent
+where @code{err} is the error description variable, the first argument
+to @code{condition-case} whose error condition you want to re-throw.
+@xref{Definition of signal}.
 @end defspec
 
 @defun error-message-string error-description
@@ -1109,6 +1123,7 @@
 @end smallexample
 @end defmac
 
+
 @node Error Symbols
 @subsubsection Error Symbols and Condition Names
 @cindex error symbol