make sure throw goes away on deterministic computations.
This commit is contained in:
parent
d7559c3f96
commit
42442bd360
@ -1124,8 +1124,10 @@ expand_term(Term,Expanded) :-
|
||||
% where was the previous catch
|
||||
catch(G, C, A) :-
|
||||
'$catch'(C,A,_),
|
||||
yap_hacks:current_choice_point(CP0),
|
||||
'$execute'(G),
|
||||
'$true'.
|
||||
yap_hacks:current_choice_point(CP1),
|
||||
(CP0 == CP1 -> !; true ).
|
||||
|
||||
% makes sure we have an environment.
|
||||
'$true'.
|
||||
@ -1139,8 +1141,10 @@ catch(G, C, A) :-
|
||||
'$system_catch'(G, M, C, A) :-
|
||||
% check current trail
|
||||
'$catch'(C,A,_),
|
||||
yap_hacks:current_choice_point(CP0),
|
||||
'$execute_nonstop'(G, M),
|
||||
'$true'.
|
||||
yap_hacks:current_choice_point(CP1),
|
||||
(CP0 == CP1 -> !; true ).
|
||||
|
||||
%
|
||||
% throw has to be *exactly* after system catch!
|
||||
|
Reference in New Issue
Block a user