aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2010-03-31 12:43:53 +0300
committerEli Zaretskii2010-03-31 12:43:53 +0300
commit7a1831cf757847b9034ef2e1c80ccb2e65258a49 (patch)
tree29d0c1998beaf10e9bd767181f29cb12ab53052d
parent4a217bedd4dffb1722401ebd2c5736886e441a0c (diff)
downloademacs-7a1831cf757847b9034ef2e1c80ccb2e65258a49.tar.gz
emacs-7a1831cf757847b9034ef2e1c80ccb2e65258a49.zip
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 @@
12010-03-31 Eli Zaretskii <eliz@gnu.org>
2
3 * control.texi (Handling Errors): How to re-throw a signal caught
4 by condition-case.
5
12010-03-26 Chong Yidong <cyd@stupidchicken.com> 62010-03-26 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * loading.texi (Hooks for Loading): Document after-load-functions. 8 * 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.
1023 1023
1024If @var{var} is @code{nil}, that means no variable is bound. Then the 1024If @var{var} is @code{nil}, that means no variable is bound. Then the
1025error symbol and associated data are not available to the handler. 1025error symbol and associated data are not available to the handler.
1026
1027@cindex rethrow a signal
1028Sometimes it is necessary to re-throw a signal caught by
1029@code{condition-case}, for some outer-level handler to catch. Here's
1030how to do that:
1031
1032@smallexample
1033 (signal (car err) (cdr err))
1034@end smallexample
1035
1036@noindent
1037where @code{err} is the error description variable, the first argument
1038to @code{condition-case} whose error condition you want to re-throw.
1039@xref{Definition of signal}.
1026@end defspec 1040@end defspec
1027 1041
1028@defun error-message-string error-description 1042@defun error-message-string error-description
@@ -1109,6 +1123,7 @@ Here's the example at the beginning of this subsection rewritten using
1109@end smallexample 1123@end smallexample
1110@end defmac 1124@end defmac
1111 1125
1126
1112@node Error Symbols 1127@node Error Symbols
1113@subsubsection Error Symbols and Condition Names 1128@subsubsection Error Symbols and Condition Names
1114@cindex error symbol 1129@cindex error symbol