small fixes for error handling
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@185 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
11
C/exec.c
11
C/exec.c
@@ -516,7 +516,10 @@ p_execute0(void)
|
||||
Prop pe;
|
||||
SMALLUNSGN mod = LookupModule(tmod);
|
||||
|
||||
if (IsAtomTerm(t)) {
|
||||
if (IsVarTerm(t)) {
|
||||
Error(INSTANTIATION_ERROR,ARG3,"call/1");
|
||||
return(FALSE);
|
||||
} else if (IsAtomTerm(t)) {
|
||||
Atom a = AtomOfTerm(t);
|
||||
pe = PredPropByAtom(a, mod);
|
||||
} else if (IsApplTerm(t)) {
|
||||
@@ -543,8 +546,10 @@ p_execute0(void)
|
||||
#endif
|
||||
}
|
||||
pe = PredPropByFunc(f, mod);
|
||||
} else
|
||||
return (FALSE); /* for the moment */
|
||||
} else {
|
||||
Error(TYPE_ERROR_CALLABLE,ARG3,"call/1");
|
||||
return(FALSE);
|
||||
}
|
||||
/* N = arity; */
|
||||
/* call may not define new system predicates!! */
|
||||
return (CallPredicate(RepPredProp(pe), B));
|
||||
|
Reference in New Issue
Block a user