From 64e1c56f28a85b386849f9dd3240d8a1e13fb998 Mon Sep 17 00:00:00 2001 From: pmoura Date: Sun, 7 Jan 2007 13:47:23 +0000 Subject: [PATCH] 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 --- pl/utils.yap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pl/utils.yap b/pl/utils.yap index d0be525b2..89a5fe0ee 100644 --- a/pl/utils.yap +++ b/pl/utils.yap @@ -192,13 +192,13 @@ call_cleanup(Goal, Catcher, Cleanup) :- '$cleanup_exception'(Exception,Catcher,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)), yap_hacks:trail_suspension_marker(Result), yap_hacks:current_choice_point(CP0), - ( call(Goal), + ( '$execute'(Goal), yap_hacks:current_choice_point(CPF), ( CP0 =:= CPF -> Result = exit, ! @@ -209,7 +209,7 @@ call_cleanup(Goal, Catcher, Cleanup) :- ). '$clean_call'(Cleanup) :- - call(Cleanup), !. + '$execute'(Cleanup), !. '$clean_call'(_). op(P,T,V) :- var(P), !,