fixes
This commit is contained in:
parent
2d19db5fce
commit
04c38ecc29
@ -358,7 +358,6 @@ bool Yap_HandleError__(const char *file, const char *function, int lineno,
|
||||
const char *serr;
|
||||
|
||||
arity_t arity = 2;
|
||||
|
||||
if (LOCAL_ErrorMessage) {
|
||||
serr = LOCAL_ErrorMessage;
|
||||
} else {
|
||||
@ -379,6 +378,7 @@ bool Yap_HandleError__(const char *file, const char *function, int lineno,
|
||||
serr);
|
||||
return false;
|
||||
}
|
||||
LOCAL_PrologMode = UserMode;
|
||||
return true;
|
||||
case RESOURCE_ERROR_AUXILIARY_STACK:
|
||||
if (LOCAL_MAX_SIZE < (char *)AuxSp - AuxBase) {
|
||||
@ -390,6 +390,7 @@ bool Yap_HandleError__(const char *file, const char *function, int lineno,
|
||||
ARG1, serr);
|
||||
return false;
|
||||
}
|
||||
LOCAL_PrologMode = UserMode;
|
||||
return true;
|
||||
case RESOURCE_ERROR_HEAP:
|
||||
if (!Yap_growheap(FALSE, 0, NULL)) {
|
||||
@ -398,7 +399,9 @@ bool Yap_HandleError__(const char *file, const char *function, int lineno,
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
Yap_Error__(false, file, function, lineno, err, TermNil, serr);
|
||||
|
||||
if (LOCAL_PrologMode == UserMode)
|
||||
Yap_Error__(false, file, function, lineno, err, TermNil, serr);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1013,6 +1016,8 @@ static Int get_exception(USES_REGS1) {
|
||||
Int rc = Yap_unify(t, ARG1);
|
||||
return rc;
|
||||
}
|
||||
LOCAL_CommittedError = NULL;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
2
C/exec.c
2
C/exec.c
@ -817,7 +817,7 @@ static bool watch_cut(Term ext USES_REGS) {
|
||||
}
|
||||
CELL *port_pt = deref_ptr(RepAppl(task) + 2);
|
||||
CELL *completion_pt = deref_ptr(RepAppl(task) + 4);
|
||||
if (LOCAL_CommittedError) {
|
||||
if (LOCAL_CommittedError && LOCAL_CommittedError->errorNo != YAP_NO_ERROR) {
|
||||
e = MkErrorTerm(LOCAL_CommittedError);
|
||||
Term t;
|
||||
if (active) {
|
||||
|
@ -227,15 +227,15 @@ print_message(L,E) :-
|
||||
'$command'(C,VL,Pos,Con) :-
|
||||
( (Con = top ; var(C) ; C = [_|_]) ->
|
||||
'$yap_strip_module'(C, EM, EG),
|
||||
'$execute_command'(EG,EM,VL,Pos,Con,C), ! ;
|
||||
'$execute_command'(EG,EM,VL,Pos,Con,C) ;
|
||||
% do term expansion
|
||||
'$expand_term'(C, Con, EC),
|
||||
'$yap_strip_module'(EC, EM, EG),
|
||||
% execute a list of commands
|
||||
'$execute_commands'(EG,EM,VL,Pos,Con,_Source),
|
||||
'$execute_commands'(EG,EM,VL,Pos,Con,_Source)
|
||||
),
|
||||
% succeed only if the *original* was at end of file.
|
||||
C == end_of_file
|
||||
).
|
||||
C == end_of_file.
|
||||
|
||||
:- c_compile('arith.yap').
|
||||
%:- stop_low_level_trace.
|
||||
|
@ -260,8 +260,7 @@ tinfo(Reg) -->
|
||||
tinfo(Reg).
|
||||
|
||||
addinfo( Desc) -->
|
||||
( ;
|
||||
[[p]]
|
||||
( [[p]]
|
||||
->
|
||||
[]
|
||||
;
|
||||
@ -807,7 +806,7 @@ print_lines( S, Prefixes, Key) -->
|
||||
{ nl(S),
|
||||
Prefixes = [PrefixS - Cmds|More],
|
||||
format(S, PrefixS, []Cmds)
|
||||
}
|
||||
},
|
||||
{
|
||||
More == []
|
||||
->
|
||||
|
Reference in New Issue
Block a user