Success or failure of the cleanup goal should also be ignored when dealing with exceptions.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1770 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura 2007-01-07 13:47:23 +00:00
parent ab33864f0c
commit 64e1c56f28

View File

@ -192,13 +192,13 @@ call_cleanup(Goal, Catcher, Cleanup) :-
'$cleanup_exception'(Exception,Catcher,Cleanup)). '$cleanup_exception'(Exception,Catcher,Cleanup)).
'$cleanup_exception'(Exception, exception(Exception), Cleanup) :- '$cleanup_exception'(Exception, exception(Exception), Cleanup) :-
call(Cleanup). '$clean_call'(Cleanup).
'$call_cleanup'(Goal,Cleanup,Result) :- '$call_cleanup'(Goal, Cleanup, Result) :-
'$freeze_goal'(Result, '$clean_call'(Cleanup)), '$freeze_goal'(Result, '$clean_call'(Cleanup)),
yap_hacks:trail_suspension_marker(Result), yap_hacks:trail_suspension_marker(Result),
yap_hacks:current_choice_point(CP0), yap_hacks:current_choice_point(CP0),
( call(Goal), ( '$execute'(Goal),
yap_hacks:current_choice_point(CPF), yap_hacks:current_choice_point(CPF),
( CP0 =:= CPF -> ( CP0 =:= CPF ->
Result = exit, ! Result = exit, !
@ -209,7 +209,7 @@ call_cleanup(Goal, Catcher, Cleanup) :-
). ).
'$clean_call'(Cleanup) :- '$clean_call'(Cleanup) :-
call(Cleanup), !. '$execute'(Cleanup), !.
'$clean_call'(_). '$clean_call'(_).
op(P,T,V) :- var(P), !, op(P,T,V) :- var(P), !,