Section "signal"

Situations might demand that a secondary coroutine controls a primary  coroutine. The programming interface allows raising a soft signal in a primary coroutine from a secondary coroutine . The effect on the primary coroutine will be that the signal message is thrown as an error the first possible moment a call port is reached.

error(<signal message>,_)
The following signal predicates are provided:
catch(G, E, F): [ISO 7.8.9]
The built-in succeeds whenever G succeeds. If there was a non-urgent exception that unifies with E, the built-in further succeeds whenever F succeeds.
throw(E): [ISO 7.8.9]
The predicate possibly fills the stack trace and then raises the exception B.
once_cleanup(G, C):
setup_once_cleanup(S, G, C):
The predicate succeeds once if G succeeds.The predicate succeeds once if G succeeds. The clean-up C is called when G fails, succeeds or throws an exception. The ternary predicate permits an initial shielded call of a setup S.
shield(G):
The predicate succeeds whenever the goal G succeeds. The goal is executed without auto-yield.
unshield(G):
The predicate succeeds whenever the goal G succeeds. The goal is executed with auto-yield.