raises an error and returns to the closest point which can catch that leap.
throw/1 stops execution of the current executed procedure and
returns to the closest point which can catch that leap. Such a catch-point
can be created with 'catch(Goal, CatchMask, RecoverGoal)'. If
CatchMask is unifiable with Term then the result of catch/3
is the result of RecoverGoal.
If no catch-point can be found throw/1 quits MINERVA.
Term term
| catch(throw(true),X,write('return to catch-point')). | Succeeds with substitution X <- true and
writes 'return to catch-point' to the current outputstream. |
This predicate is part of the ISO-Prolog Standard.
| scroll to top |
|