diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-04-07 11:51:26 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-04-07 11:51:58 +0200 |
commit | bc3901092dc777d832862862e606ae2ddeb6f2f8 (patch) | |
tree | 2d0ca4de3f80861b003cbb58dc19c05d5df3bdd4 /doc/ref | |
parent | 7d39b48875475b2d206789cb9b6486b79c7be55d (diff) | |
download | guile-bc3901092dc777d832862862e606ae2ddeb6f2f8.tar.gz |
doc: Link exceptions and escape continuations.
* doc/ref/api-control.texi (Prompt Primitives): Mention exceptions.
(Exception Terminology): Link to `call/ec'.
Diffstat (limited to 'doc/ref')
-rw-r--r-- | doc/ref/api-control.texi | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi index 278a03dcb..56ffba26b 100644 --- a/doc/ref/api-control.texi +++ b/doc/ref/api-control.texi @@ -582,7 +582,9 @@ One example where this optimization matters is @dfn{escape continuations}. Escape continuations are delimited continuations whose only use is to make a non-local exit---i.e., to escape from the current continuation. Such continuations are invoked only once, and for this -reason they are sometimes called @dfn{one-shot continuations}. +reason they are sometimes called @dfn{one-shot continuations}. A common +use of escape continuations is when throwing an exception +(@pxref{Exceptions}). The constructs below are syntactic sugar atop prompts to simplify the use of escape continuations. @@ -1031,6 +1033,11 @@ to avoid the risk of confusion with POSIX signals. This manual prefers to speak of throwing and catching exceptions, since this terminology matches the corresponding Guile primitives. +The exception mechanism described in this section has connections with +@dfn{delimited continuations} (@pxref{Prompts}). In particular, +throwing an exception is akin to invoking an @dfn{escape continuation} +(@pxref{Prompt Primitives, @code{call/ec}}). + @node Catch @subsubsection Catching Exceptions |