- 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
- Foreign language wrapper support functions
- 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
s="latex">
int PL_instantiation_error(term_t
culprit) Raise
int PL_uninstantiation_error(term_t
culprit) Raise
int PL_representation_error(const
char *resource) Raise
int PL_type_error(const
char *expected, term_t culprit) Raise
int PL_domain_error(const
char *expected, term_t culprit) Raise
int PL_existence_error(const
char *type, term_t culprit) Raise
int PL_permission_error(const
char *operation, const char *type, term_t culprit) Raise
int PL_resource_error(const
char *resource) Raise
int PL_syntax_error(const
char *message, IOSTREAM *in) Raise
instantiation_error
. Culprit is ignored,
but should be bound to the term that is insufficiently instantiated. See
instantiation_error/1.uninstantiation_error(culprit)
. This should be called
if an argument that must be unbound at entry is bound to culprit.
This error is typically raised for a pure output arguments such as a
newly created stream handle (e.g., the third argument of open/3).representation_error(resource)
. See representation_error/1.type_error(expected, culprit)
. See type_error/2.domain_error(expected, culprit)
. See domain_error/2.existence_error(type, culprit)
. See existence_error/2.permission_error(operation, type, culprit)
. See
permission_error/3.resource_error(resource)
. See resource_error/1.syntax_error(message)
. If arg is not NULL
,
add information about the current position of the input stream.
12.4.8 Foreign language wrapper support functions
In addition to the functions described in
section 12.4.4.2,
there is a family of functions that is used for automatic generation of
wrapper functions, for example using the Prolog library library(qpforeign)
that provides a Quintus/SICStus compatible foreign language interface.
The PL_cvt_i_*() family of functions is suitable for use with a
_Gen