Next: iklib syntaxes dynenv, Previous: iklib syntaxes returnable, Up: iklib syntaxes [Index]
Sometimes we want to block raised exceptions, for example when we are already handling a previously raised exception.
Evaluate ?thunk and return its return values.
When used with one argument: if ?thunk raises an exception, return the raised object.
When used with two arguments: if ?thunk raises an exception, apply the procedure ?exception-retvals-maker to the raised object and return its return values. Exceptions raised by ?exception-retvals-maker are not blocked.
Usage examples:
(import (vicare)) (with-blocked-exceptions (lambda () (raise 99))) ⇒ 99 (with-blocked-exceptions (lambda (E) (values E 1 2 3)) (lambda () (raise 99))) ⇒ 99 1 2 3