:more db stuff

This commit is contained in:
Vitor Santos Costa
2018-06-28 12:48:29 +01:00
parent d3370ee141
commit 6c1d3d1a95
18 changed files with 122 additions and 71 deletions

View File

@@ -437,12 +437,15 @@ unsigned char *Yap_readText(seq_tv_t *inp USES_REGS) {
LOCAL_Error_TYPE = TYPE_ERROR_TEXT;
}
}
LOCAL_ActiveError->errorRawTerm = MkUStringTerm(inp->val.uc);
}
if (LOCAL_Error_TYPE != YAP_NO_ERROR) {
if (inp->val.uc != NULL) {
LOCAL_ActiveError->errorRawTerm = MkUStringTerm(inp->val.uc);
}
Yap_ThrowError(LOCAL_Error_TYPE, LOCAL_ActiveError->errorRawTerm, "Converting to text from term ");
return NULL;
}
}
if (IsAtomTerm(inp->val.t) && inp->type & YAP_STRING_ATOM) {
// this is a term, extract to a buffer, and representation is wide