fix error messages
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@338 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
0fa942e238
commit
be135b514f
@ -319,7 +319,7 @@ Error (yap_error_number type, Term where, char *format,...)
|
||||
if (type == PURE_ABORT)
|
||||
where = TermNil;
|
||||
else
|
||||
where = Deref(where);
|
||||
where = CopyTerm(Deref(where));
|
||||
if (IsVarTerm(where)) {
|
||||
/* we must be careful someone gave us a copy to a local variable */
|
||||
Term t = MkVarTerm();
|
||||
@ -327,6 +327,7 @@ Error (yap_error_number type, Term where, char *format,...)
|
||||
where = Deref(where);
|
||||
}
|
||||
PrologMode |= InErrorMode;
|
||||
where = CopyTerm(where);
|
||||
va_start (ap, format);
|
||||
/* now build the error string */
|
||||
if (format != NULL)
|
||||
@ -1752,7 +1753,7 @@ Error (yap_error_number type, Term where, char *format,...)
|
||||
if (type == PURE_ABORT)
|
||||
JumpToEnv(MkAtomTerm(LookupAtom("abort")));
|
||||
else
|
||||
JumpToEnv(CopyTerm(MkApplTerm(fun, 2, nt)));
|
||||
JumpToEnv(MkApplTerm(fun, 2, nt));
|
||||
P = (yamop *)FAILCODE;
|
||||
}
|
||||
PrologMode &= ~InErrorMode;
|
||||
|
@ -251,10 +251,9 @@ module(N) :-
|
||||
( '$check_import'(M,T,N,K) ->
|
||||
% '$format'(user_error,"[vsc1: Importing ~w to ~w]~n",[M:N/K,T]),
|
||||
( T = user ->
|
||||
( recordzifnot('$import','$import'(M,user,N,K),_) -> write(importing(M,T,N,K)),nl
|
||||
; true)
|
||||
( recordzifnot('$import','$import'(M,user,N,K),_) -> true ; true)
|
||||
;
|
||||
( recordaifnot('$import','$import'(M,T,N,K),_) -> write(importing(M,T,N,K)),nl ; true )
|
||||
( recordaifnot('$import','$import'(M,T,N,K),_) -> true ; true )
|
||||
)
|
||||
;
|
||||
true
|
||||
@ -292,9 +291,9 @@ module(N) :-
|
||||
% '$trace_module'(importing(M:N/K,Mod)),
|
||||
% '$format'(user_error,"[vsc2: Importing ~w to ~w]~n",[M:N/K,T]),
|
||||
(Mod = user ->
|
||||
( recordzifnot('$import','$import'(M,user,N,K),_) -> write(importing(M,T,N,K)),nl ; true )
|
||||
( recordzifnot('$import','$import'(M,user,N,K),_) -> true ; true )
|
||||
;
|
||||
( recordaifnot('$import','$import'(M,Mod,N,K),_) -> write(importing(M,T,N,K)),nl ; true )
|
||||
( recordaifnot('$import','$import'(M,Mod,N,K),_) -> true ; true )
|
||||
)
|
||||
;
|
||||
true
|
||||
|
Reference in New Issue
Block a user