|Did you know ...||Search Documentation:|
|PlCheck() convenience function|
In general, wherever there is a method that wraps a C "PL_" function, PlCheck() can be used to return failure to Prolog from the "PL_" function.
The code for PlCheck() is very simple - it checks the return
code and throws
PlFail if the return code isn't "true". If
the return code is from a Prolog function (that is, a function starting
with "PL_"), the return code can be "false" either because of failure or
because an exception happened. If the cause is an exception, then the
only sensible thing is to return to Prolog immediately; throwing
will do this. See also section 2.18.2.