interface speedups
bad error message in X is foo>>2. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1894 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
20
C/eval.c
20
C/eval.c
@@ -116,8 +116,14 @@ Eval(Term t, E_ARGS)
|
||||
ExpEntry *p;
|
||||
|
||||
if (EndOfPAEntr(p = RepExpProp(Yap_GetExpProp(name, 0)))) {
|
||||
Term ti[2], terror;
|
||||
|
||||
/* error */
|
||||
Yap_Error(TYPE_ERROR_EVALUABLE, t,
|
||||
ti[0] = t;
|
||||
ti[1] = MkIntegerTerm(0);
|
||||
/* error */
|
||||
terror = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("/"),2), 2, ti);
|
||||
Yap_Error(TYPE_ERROR_EVALUABLE, terror,
|
||||
"atom %s for arithmetic expression",
|
||||
RepAtom(name)->StrOfAE);
|
||||
P = (yamop *)FAILCODE;
|
||||
@@ -184,10 +190,16 @@ Yap_Eval(Term t, E_ARGS)
|
||||
ExpEntry *p;
|
||||
|
||||
if (EndOfPAEntr(p = RepExpProp(Yap_GetExpProp(name, 0)))) {
|
||||
Term ti[2], terror;
|
||||
|
||||
/* error */
|
||||
Yap_Error(TYPE_ERROR_EVALUABLE, t,
|
||||
"atom %s for arithmetic expression",
|
||||
RepAtom(name)->StrOfAE);
|
||||
ti[0] = t;
|
||||
ti[1] = MkIntegerTerm(0);
|
||||
/* error */
|
||||
terror = Yap_MkApplTerm(Yap_MkFunctor(Yap_LookupAtom("/"),2), 2, ti);
|
||||
Yap_Error(TYPE_ERROR_EVALUABLE, terror,
|
||||
"atom %s for arithmetic expression",
|
||||
RepAtom(name)->StrOfAE);
|
||||
P = (yamop *)FAILCODE;
|
||||
RERROR();
|
||||
}
|
||||
|
Reference in New Issue
Block a user