diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-04-10 16:34:09 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-04-10 16:34:09 -0700 |
commit | 710889ccdf6f8f8501f0a9409258b3850002d41d (patch) | |
tree | b67c9a4a55f973c3622ee5c029e586ccf211b571 /txr.1 | |
parent | 079e081ab3f1a1bef175d8185c80108d16452c74 (diff) | |
download | txr-710889ccdf6f8f8501f0a9409258b3850002d41d.tar.gz txr-710889ccdf6f8f8501f0a9409258b3850002d41d.tar.bz2 txr-710889ccdf6f8f8501f0a9409258b3850002d41d.zip |
New catch** macro.
* lisplib.c (except_set_entries): Autoload for catch** symbol.
* share/txr/stdlib/except.tl (catch**): New macro.
* txr.1: Document catch** macro, and the desc slot of
the catch-frame struct.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -38662,6 +38662,8 @@ string and additional arguments. .mets \ \ >> {( symbol <> ( arg *) << body-form *)}*) .mets (catch* < try-expression .mets \ \ >> {( symbol >> ( type-arg << arg *) << body-form *)}*) +.mets (catch** < try-expression +.mets \ \ >> {( symbol < desc >> ( type-arg << arg *) << body-form *)}*) .syne .desc The @@ -38728,6 +38730,19 @@ Then the exception arguments follow. In contrast, only the exception arguments are passed to the clauses of .codn catch . +The +.code catch** +macro is a further variant, which differs from +.code catch* +by requiring each catch clause to provide a description +.metn desc , +an expression which evaluates to a character string. +The +.meta desc +expressions are evaluated in left-to-right order prior to the +evaluation of +.metn try-expression . + Also see: the .code unwind-protect operator, and the functions @@ -39297,7 +39312,7 @@ and not a derived representation. .coNP Structures @, frame @ catch-frame and @ handle-frame .synb .mets (defstruct frame nil) -.mets (defstruct catch-frame frame types jump) +.mets (defstruct catch-frame frame types desc jump) .mets (defstruct handle-frame frame types fun) .syne .desc @@ -39341,6 +39356,19 @@ slot. This holds the list of exception type symbols which are matched by the catch or handler. The +.code desc +slot of a +.code catch-frame +holds a list of the descriptions produced by the +.code catch** +macro. If there are no descriptions, then this member is +.codn nil , +otherwise it is a list whose elements are in correspondence +with the list in the +.code types +slot. + +The .code jump slot of a .code catch-frame |