Commit 7a1831cf authored by Eli Zaretskii's avatar Eli Zaretskii

Explain how to re-throw a signal.

 control.texi (Handling Errors): How to re-throw a signal caught
 by condition-case.
parent 4a217bed
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> 2010-03-26 Chong Yidong <cyd@stupidchicken.com>
* loading.texi (Hooks for Loading): Document after-load-functions. * loading.texi (Hooks for Loading): Document after-load-functions.
......
...@@ -1023,6 +1023,20 @@ error description. ...@@ -1023,6 +1023,20 @@ error description.
If @var{var} is @code{nil}, that means no variable is bound. Then the 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. 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 @end defspec
@defun error-message-string error-description @defun error-message-string error-description
...@@ -1109,6 +1123,7 @@ Here's the example at the beginning of this subsection rewritten using ...@@ -1109,6 +1123,7 @@ Here's the example at the beginning of this subsection rewritten using
@end smallexample @end smallexample
@end defmac @end defmac
@node Error Symbols @node Error Symbols
@subsubsection Error Symbols and Condition Names @subsubsection Error Symbols and Condition Names
@cindex error symbol @cindex error symbol
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment