diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-10 23:22:42 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-10 23:22:42 -0700 |
commit | ec3ef435c68af026ddfca6fa312bde18077194b8 (patch) | |
tree | 74d73dedc3fdf652b3409e880d490b9fe475a36a /txr.1 | |
parent | 46a525574121efd4e2ad5d1420d2ba11a67e9a1c (diff) | |
download | txr-ec3ef435c68af026ddfca6fa312bde18077194b8.tar.gz txr-ec3ef435c68af026ddfca6fa312bde18077194b8.tar.bz2 txr-ec3ef435c68af026ddfca6fa312bde18077194b8.zip |
Invoke finalizers if object initialization bails.
* struct.c (make_struct): Add unwind protection around
the initialization of the struct object, which calls
the partially initialized object's finalizers if
initialization is abandoned by a non-local exit.
* txr.1: Document the behavior, under make-struct and
the new macro.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -18232,6 +18232,11 @@ overrides from the .code new macro, and lastly the "boa constructor" overrides. +If any of the initializations abandon the evaluation of +.code new +by a non-local exit such as an exception throw, the object's +finalizers, if any, are invoked. + .coNP Macro @ qref .synb .mets (qref < object-form @@ -18681,6 +18686,11 @@ is processed, if not empty, and finally, the .metn arg -s are processed, if present, and passed to the boa constructor. +If any of the initializations abandon the evaluation of +.code make-struct +by a non-local exit such as an exception throw, the object's +finalizers, if any, are invoked. + .coNP Function @ copy-struct .synb .mets (copy-struct << struct-obj ) |