Availability:C-language interface function
(term_t)0
if the Prolog goal simply failed. If
there is an exception, PL_exception()
returns a term reference that contains the exception term.
Additionally, PL_exception(0)
returns the pending
exception in the current query or (term_t)0
if no exception
is pending. This can be used to check the error status after a failing
call to, e.g., one of the unification functions.