r7rs-small-texinfo

Unnamed repository; edit this file 'description' to name the repository.
git clone https://kaka.farm/~git/r7rs-small-texinfo
Log | Files | Refs

commit 2b7ac691ddf21b5818b2ba926f232504bfab5432
parent f2ceb7586f272a4a7b547645ae2a2f8668b33a72
Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz>
Date:   Sun,  4 Feb 2024 21:57:56 -0500

Exceptions (procs): Reflow paragraphs.

Diffstat:
Mdoc/r7rs-small/procedures/exceptions.texinfo | 93++++++++++++++++++++++++++++++++++++++-----------------------------------------
1 file changed, 45 insertions(+), 48 deletions(-)

diff --git a/doc/r7rs-small/procedures/exceptions.texinfo b/doc/r7rs-small/procedures/exceptions.texinfo @@ -1,29 +1,30 @@ @node Exceptions @section Exceptions -This section describes Scheme's exception-handling and exception-raising procedures. -For the concept of Scheme exceptions, see @ref{Error situations and unspecified behavior}. -See also @ref{Exception handling} for the @code{guard} -syntax. +This section describes Scheme's exception-handling and +exception-raising procedures. For the concept of Scheme exceptions, +see @ref{Error situations and unspecified behavior}. See also +@ref{Exception handling} for the @code{guard} syntax. -@dfn{Exception handlers} are one-argument procedures that determine the action the program -takes when an exceptional situation is signaled. The system implicitly maintains a -current exception handler in the dynamic environment. +@dfn{Exception handlers} are one-argument procedures that determine +the action the program takes when an exceptional situation is +signaled. The system implicitly maintains a current exception handler +in the dynamic environment. -The program raises an exception by invoking the current exception handler, passing it an -object encapsulating information about the exception. Any procedure accepting one -argument can serve as an exception handler and any object can be used to represent an -exception. +The program raises an exception by invoking the current exception +handler, passing it an object encapsulating information about the +exception. Any procedure accepting one argument can serve as an +exception handler and any object can be used to represent an exception. @deffn procedure with-exception-handler handler thunk -It is an error if @var{handler} does not accept one argument. -It is also an error if @var{thunk} does not accept zero arguments. +It is an error if @var{handler} does not accept one argument. It is +also an error if @var{thunk} does not accept zero arguments. -The @code{with-exception-handler} procedure returns the results of invoking -@var{thunk}. @var{Handler} is installed as the current -exception handler -in the dynamic environment used for the invocation of @var{thunk}. +The @code{with-exception-handler} procedure returns the results of +invoking @var{thunk}. @var{Handler} is installed as the current +exception handler in the dynamic environment used for the invocation +of @var{thunk}. @lisp (call-with-current-continuation @@ -53,23 +54,22 @@ After printing,the second example then raises another exception. @deffn procedure raise obj -Raises an exception by invoking the current exception -handler on @var{obj}. The handler is called with the same -dynamic environment as that of the call to @code{raise}, except that -the current exception handler is the one that was in place when the -handler being called was installed. If the handler returns, a secondary -exception is raised in the same dynamic environment as the handler. -The relationship between @var{obj} and the object raised by -the secondary exception is unspecified. +Raises an exception by invoking the current exception handler on +@var{obj}. The handler is called with the same dynamic environment as +that of the call to @code{raise}, except that the current exception +handler is the one that was in place when the handler being called was +installed. If the handler returns, a secondary exception is raised +in the same dynamic environment as the handler. The relationship +between @var{obj} and the object raised by the secondary exception +is unspecified. @end deffn @deffn procedure raise-continuable obj -Raises an exception by invoking the current -exception handler on @var{obj}. The handler is called with -the same dynamic environment as the call to -@code{raise-continuable}, except that: (1) the current +Raises an exception by invoking the current exception handler on +@var{obj}. The handler is called with the same dynamic environment +as the call to @code{raise-continuable}, except that: (1) the current exception handler is the one that was in place when the handler being called was installed, and (2) if the handler being called returns, then it will again become the current exception handler. If the @@ -98,11 +98,11 @@ the call to @code{raise-continuable}. @var{Message} should be a string. -Raises an exception as if by calling -@code{raise} on a newly allocated implementation-defined object which encapsulates -the information provided by @var{message}, -as well as any @var{obj}s, known as the @dfn{irritants}. -The procedure @code{error-object?} must return @code{#t} on such objects. +Raises an exception as if by calling @code{raise} on a newly +allocated implementation-defined object which encapsulates the +information provided by @var{message}, as well as any @var{obj}s, +known as the @dfn{irritants}. The procedure @code{error-object?} +must return @code{#t} on such objects. @lisp (define (null-list? l) @@ -117,35 +117,32 @@ The procedure @code{error-object?} must return @code{#t} on such objects. @deffn procedure error-object? obj -Returns @code{#t} if @var{obj} is an object created by @code{error} -or one of an implementation-defined set of objects. Otherwise, it returns -@code{#f}. -The objects used to signal errors, including those which satisfy the -predicates @code{file-error?} and @code{read-error?}, may or may not -satisfy @code{error-object?}. +Returns @code{#t} if @var{obj} is an object created by @code{error} +or one of an implementation-defined set of objects. Otherwise, it +returns @code{#f}. The objects used to signal errors, including those +which satisfy the predicates @code{file-error?} and @code{read-error?}, +may or may not satisfy @code{error-object?}. @end deffn @deffn procedure error-object-message error-object -Returns the message encapsulated by -@var{error-object}. +Returns the message encapsulated by @var{error-object}. @end deffn @deffn procedure error-object-irritants error-object -Returns a list of the irritants encapsulated by -@var{error-object}. +Returns a list of the irritants encapsulated by @var{error-object}. @end deffn @deffn procedure read-error? obj @deffnx procedure file-error? obj -Error type predicates. Returns @code{#t} if @var{obj} is an -object raised by the @code{read} procedure or by the inability to open -an input or output port on a file, respectively. Otherwise, it -returns @code{#f}. +Error type predicates. Returns @code{#t} if @var{obj} is an object +raised by the @code{read} procedure or by the inability to open an +input or output port on a file, respectively. Otherwise, it returns +@code{#f}. @end deffn