make error handling for callable more ISO like.
This commit is contained in:
@@ -724,7 +724,7 @@ get_pred(Term t, Term tmod, char *pname)
|
||||
} else if (IsApplTerm(t)) {
|
||||
Functor fun = FunctorOfTerm(t);
|
||||
if (IsExtensionFunctor(fun)) {
|
||||
Yap_Error(TYPE_ERROR_CALLABLE, t0, pname);
|
||||
Yap_Error(TYPE_ERROR_CALLABLE, Yap_PredicateIndicator(t, tmod), pname);
|
||||
return NULL;
|
||||
}
|
||||
if (fun == FunctorModule) {
|
||||
@@ -2615,8 +2615,11 @@ p_compile( USES_REGS1 )
|
||||
addclause(t, codeadr, (int) (IntOfTerm(t1) & 3), mod, &tn);
|
||||
YAPLeaveCriticalSection();
|
||||
if (LOCAL_ErrorMessage) {
|
||||
if (LOCAL_Error_TYPE == TYPE_ERROR_CALLABLE) {
|
||||
Yap_Error(LOCAL_Error_TYPE, Yap_PredicateIndicator(t, mod), LOCAL_ErrorMessage);
|
||||
}
|
||||
if (IntOfTerm(t1) & 4) {
|
||||
Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term,
|
||||
Yap_Error(TYPE_ERROR_CALLABLE, LOCAL_Error_Term,
|
||||
"in line %d, %s", Yap_FirstLineInParse(), LOCAL_ErrorMessage);
|
||||
} else {
|
||||
Yap_Error(LOCAL_Error_TYPE, LOCAL_Error_Term, LOCAL_ErrorMessage);
|
||||
|
Reference in New Issue
Block a user