fix error handling on entry arguments.
This commit is contained in:
parent
10c0f7a175
commit
f137773011
@ -797,8 +797,9 @@ p_unary_is(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
top = Yap_Eval(Deref(ARG3));
|
top = Yap_Eval(Deref(ARG3));
|
||||||
if (top == 0L)
|
if (!Yap_FoundArithError(top, ARG3)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
if (IsIntTerm(t)) {
|
if (IsIntTerm(t)) {
|
||||||
Term tout = Yap_FoundArithError(eval1(IntegerOfTerm(t), top), Deref(ARG3));
|
Term tout = Yap_FoundArithError(eval1(IntegerOfTerm(t), top), Deref(ARG3));
|
||||||
if (!tout)
|
if (!tout)
|
||||||
|
@ -1117,13 +1117,15 @@ p_binary_is(void)
|
|||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
t1 = Yap_Eval(Deref(ARG3));
|
t1 = Yap_Eval(Deref(ARG3));
|
||||||
if (t1 == 0L)
|
if (!Yap_FoundArithError(t1, ARG3)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
t2 = Yap_Eval(Deref(ARG4));
|
t2 = Yap_Eval(Deref(ARG4));
|
||||||
if (t2 == 0L)
|
if (!Yap_FoundArithError(t2, ARG4)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
if (IsIntTerm(t)) {
|
if (IsIntTerm(t)) {
|
||||||
Term tout = Yap_FoundArithError(eval2(IntegerOfTerm(t), t1, t2), 0L);
|
Term tout = Yap_FoundArithError(eval2(IntOfTerm(t), t1, t2), 0L);
|
||||||
if (!tout)
|
if (!tout)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return Yap_unify_constant(ARG1,tout);
|
return Yap_unify_constant(ARG1,tout);
|
||||||
|
Reference in New Issue
Block a user