- Documentation
- Reference manual
- Foreign Language Interface
- The Foreign Include File
- Argument Passing and Control
- Atoms and functors
- Analysing Terms via the Foreign Interface
- Constructing Terms
- Unifying data
- Convenient functions to generate Prolog exceptions
- Serializing and deserializing Prolog terms
- BLOBS: Using atoms to store arbitrary binary data
- Exchanging GMP numbers
- Calling Prolog from C
- Discarding Data
- String buffering
- Foreign Code and Modules
- Prolog exceptions in foreign code
- Catching Signals (Software Interrupts)
- Miscellaneous
- Errors and warnings
- Environment Control from Foreign Code
- Querying Prolog
- Registering Foreign Predicates
- Foreign Code Hooks
- Storing foreign data
- Embedding SWI-Prolog in other applications
- The Foreign Include File
- Foreign Language Interface
- Packages
- Reference manual
_unify_bool(),
but raises a type error if t is not a variable or a boolean.
The second family of functions in this section simplifies the
generation of ISO compatible error terms. Any foreign function that
calls this function must return to Prolog with the return code of the
error function or the constant FALSE
. If available, these
error functions add the name of the calling predicate to the error
context. See also PL_raise_exception().
- int PL_instantiation_error(term_t culprit)
- Raise
instantiation_error
. Culprit is ignored, but should be bound to the term that is insufficiently instantiated. See instantiation_error/1. - int PL_uninstantiation_error(term_t culprit)
- Raise
uninstantiation_error(culprit)
. This should be called if an argument that must be unbound at entry is bo