summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2010-03-31 12:43:53 +0300
committerEli Zaretskii <eliz@gnu.org>2010-03-31 12:43:53 +0300
commit7a1831cf757847b9034ef2e1c80ccb2e65258a49 (patch)
tree29d0c1998beaf10e9bd767181f29cb12ab53052d
parent4a217bedd4dffb1722401ebd2c5736886e441a0c (diff)
downloademacs-7a1831cf757847b9034ef2e1c80ccb2e65258a49.tar.gz
Explain how to re-throw a signal.
control.texi (Handling Errors): How to re-throw a signal caught by condition-case.
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/control.texi15
2 files changed, 20 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index fd5fe0e5262..6f119b5d288 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -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.
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 2b4aabaff83..1c4447e9eb5 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -1023,6 +1023,20 @@ error description.
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 @@ Here's the example at the beginning of this subsection rewritten using
@end smallexample
@end defmac
+
@node Error Symbols
@subsubsection Error Symbols and Condition Names
@cindex error symbol