handle user error in blob to file.
This commit is contained in:
parent
4c0615bb54
commit
b9369e1e7d
@ -43,6 +43,9 @@ char * Yap_blob_to_string(AtomEntry *ref, const char *s0, size_t sz)
|
|||||||
}
|
}
|
||||||
Atom at = AbsAtom(ref);
|
Atom at = AbsAtom(ref);
|
||||||
rc = type->write(f, at, 0);
|
rc = type->write(f, at, 0);
|
||||||
|
if (rc < 0) {
|
||||||
|
Yap_Error( EVALUATION_ERROR_UNDEFINED, MkAtomTerm(at), "failure in user-defined blob to string code" );
|
||||||
|
}
|
||||||
fclose(f); // return the final result.
|
fclose(f); // return the final result.
|
||||||
return s;
|
return s;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user