make sure call_cleanup makes exception handler fail.

This commit is contained in:
Vitor Santos Costa 2009-05-04 14:02:17 -05:00
parent 9ce8df7bcd
commit 848e1209a2

View File

@ -65,8 +65,12 @@ call_cleanup(Goal, Catcher, Cleanup) :-
'$cleanup_exception'(Exception, exception(Exception), Cleanup) :- !,
% whatever happens, let exception go through
catch('$clean_call'(Cleanup),_,true),
throw(Exception).
(
catch('$clean_call'(Cleanup),_,fail),
fail
;
throw(Exception)
).
'$cleanup_exception'(Exception, _, _) :-
throw(Exception).