Updated the behavior of the call_cleanup/2-3 built-in predicates to match SWI-Prolog regarding handling of exceptions.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1890 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
7132173dbd
commit
24ade76e94
@ -191,8 +191,11 @@ call_cleanup(Goal, Catcher, Cleanup) :-
|
||||
Exception,
|
||||
'$cleanup_exception'(Exception,Catcher,Cleanup)).
|
||||
|
||||
'$cleanup_exception'(Exception, exception(Exception), Cleanup) :-
|
||||
'$clean_call'(Cleanup).
|
||||
'$cleanup_exception'(Exception, exception(Exception), Cleanup) :- !,
|
||||
'$clean_call'(Cleanup),
|
||||
throw(Exception).
|
||||
'$cleanup_exception'(Exception, _, _) :-
|
||||
throw(Exception).
|
||||
|
||||
'$call_cleanup'(Goal, Cleanup, Result) :-
|
||||
'$freeze_goal'(Result, '$clean_call'(Cleanup)),
|
||||
|
Reference in New Issue
Block a user