error handling
This commit is contained in:
parent
8973689b43
commit
7651f507c6
@ -1697,6 +1697,9 @@ bool Yap_addclause(Term t, yamop *cp, Term tmode, Term mod, Term *t4ref)
|
|||||||
mode = asserta;
|
mode = asserta;
|
||||||
} else if (tmode == TermAssertzStatic) {
|
} else if (tmode == TermAssertzStatic) {
|
||||||
mode = assertz;
|
mode = assertz;
|
||||||
|
} else {
|
||||||
|
Yap_Error(DOMAIN_ERROR_OUT_OF_RANGE, tmode,
|
||||||
|
"compilation mode used to assert") return false;
|
||||||
}
|
}
|
||||||
if (IsApplTerm(t) && FunctorOfTerm(t) == FunctorAssert)
|
if (IsApplTerm(t) && FunctorOfTerm(t) == FunctorAssert)
|
||||||
tf = ArgOfTerm(1, t);
|
tf = ArgOfTerm(1, t);
|
||||||
@ -1862,7 +1865,8 @@ bool Yap_addclause(Term t, yamop *cp, Term tmode, Term mod, Term *t4ref)
|
|||||||
} else {
|
} else {
|
||||||
tf = Yap_MkStaticRefTerm(ClauseCodeToStaticClause(cp), p);
|
tf = Yap_MkStaticRefTerm(ClauseCodeToStaticClause(cp), p);
|
||||||
}
|
}
|
||||||
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "add %s/%ld %p", RepAtom(at)->StrOfAE, Arity);
|
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "add %s/%ld %p",
|
||||||
|
RepAtom(at)->StrOfAE, Arity);
|
||||||
if (mod == PROLOG_MODULE)
|
if (mod == PROLOG_MODULE)
|
||||||
mod = TermProlog;
|
mod = TermProlog;
|
||||||
if (pflags & MultiFileFlag) {
|
if (pflags & MultiFileFlag) {
|
||||||
|
Reference in New Issue
Block a user