copy error routines from SWI. That was easy.
This commit is contained in:
@@ -683,6 +683,36 @@ PL_EXPORT(LRESULT) PL_win_message_proc(HWND hwnd,
|
||||
|
||||
X_API intptr_t PL_query(int); /* get information from Prolog */
|
||||
|
||||
/*******************************
|
||||
* ERRORS *
|
||||
*******************************/
|
||||
|
||||
PL_EXPORT(int) PL_get_atom_ex(term_t t, atom_t *a);
|
||||
PL_EXPORT(int) PL_get_integer_ex(term_t t, int *i);
|
||||
PL_EXPORT(int) PL_get_long_ex(term_t t, long *i);
|
||||
PL_EXPORT(int) PL_get_int64_ex(term_t t, int64_t *i);
|
||||
PL_EXPORT(int) PL_get_intptr_ex(term_t t, intptr_t *i);
|
||||
PL_EXPORT(int) PL_get_size_ex(term_t t, size_t *i);
|
||||
PL_EXPORT(int) PL_get_bool_ex(term_t t, int *i);
|
||||
PL_EXPORT(int) PL_get_float_ex(term_t t, double *f);
|
||||
PL_EXPORT(int) PL_get_char_ex(term_t t, int *p, int eof);
|
||||
PL_EXPORT(int) PL_unify_bool_ex(term_t t, int val);
|
||||
PL_EXPORT(int) PL_get_pointer_ex(term_t t, void **addrp);
|
||||
PL_EXPORT(int) PL_unify_list_ex(term_t l, term_t h, term_t t);
|
||||
PL_EXPORT(int) PL_unify_nil_ex(term_t l);
|
||||
PL_EXPORT(int) PL_get_list_ex(term_t l, term_t h, term_t t);
|
||||
PL_EXPORT(int) PL_get_nil_ex(term_t l);
|
||||
|
||||
PL_EXPORT(int) PL_instantiation_error(term_t culprit);
|
||||
PL_EXPORT(int) PL_representation_error(const char *resource);
|
||||
PL_EXPORT(int) PL_type_error(const char *expected, term_t culprit);
|
||||
PL_EXPORT(int) PL_domain_error(const char *expected, term_t culprit);
|
||||
PL_EXPORT(int) PL_existence_error(const char *type, term_t culprit);
|
||||
PL_EXPORT(int) PL_permission_error(const char *operation,
|
||||
const char *type, term_t culprit);
|
||||
PL_EXPORT(int) PL_resource_error(const char *resource);
|
||||
|
||||
|
||||
/*******************************
|
||||
* BLOBS *
|
||||
*******************************/
|
||||
|
Reference in New Issue
Block a user