Another attemp to get call_cleanup/2-3 right. Third is the charm (I hope...).

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1769 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
pmoura
2007-01-07 11:27:09 +00:00
parent 9d3618393f
commit ab33864f0c
2 changed files with 7 additions and 3 deletions

View File

@@ -189,8 +189,7 @@ call_cleanup(Goal, Cleanup) :-
call_cleanup(Goal, Catcher, Cleanup) :-
catch('$call_cleanup'(Goal,Cleanup,Result),
Exception,
'$cleanup_exception'(Exception,Catcher,Cleanup)),
Result = exit.
'$cleanup_exception'(Exception,Catcher,Cleanup)).
'$cleanup_exception'(Exception, exception(Exception), Cleanup) :-
call(Cleanup).
@@ -205,7 +204,8 @@ call_cleanup(Goal, Catcher, Cleanup) :-
Result = exit, !
; true
)
; Result = fail
; Result = fail,
fail
).
'$clean_call'(Cleanup) :-