fix error handling in debugger (first try).

add extra argument to handle.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@284 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-01-10 18:01:14 +00:00
parent ea45ad8f3d
commit bd28a74d45
4 changed files with 53 additions and 67 deletions

View File

@@ -311,10 +311,17 @@ Error (yap_error_number type, Term where, char *format,...)
int serious;
char *tp = p;
int psize = 512;
/* disallow recursive error handling */
if (PrologMode & InErrorMode)
return(P);
where = Deref(where);
if (IsVarTerm(where)) {
/* we must be careful someone gave us a copy to a local variable */
Term t = MkVarTerm();
unify(t, where);
where = Deref(where);
}
PrologMode |= InErrorMode;
va_start (ap, format);
/* now build the error string */