type error for string

This commit is contained in:
Vitor Santos Costa 2011-06-13 01:42:32 +01:00
parent 9eabaa580c
commit 2bc9f6093c
2 changed files with 16 additions and 0 deletions

View File

@ -1771,6 +1771,21 @@ Yap_Error(yap_error_number type, Term where, char *format,...)
serious = TRUE;
}
break;
case TYPE_ERROR_STRING:
{
int i;
Term ti[2];
i = strlen(tmpbuf);
ti[0] = MkAtomTerm(AtomString);
ti[1] = where;
nt[0] = Yap_MkApplTerm(FunctorTypeError, 2, ti);
tp = tmpbuf+i;
psize -= i;
fun = FunctorError;
serious = TRUE;
}
break;
case TYPE_ERROR_UBYTE:
{
int i;

View File

@ -547,6 +547,7 @@ typedef enum
TYPE_ERROR_NUMBER,
TYPE_ERROR_PREDICATE_INDICATOR,
TYPE_ERROR_PTR,
TYPE_ERROR_STRING,
TYPE_ERROR_UBYTE,
TYPE_ERROR_UCHAR,
TYPE_ERROR_VARIABLE,