Fix cleanup combinator in the case where always-cleanup throws an error

db4
Slava Pestov 2007-12-29 12:35:51 -05:00
parent e58cbb2cda
commit e2f270be70
2 changed files with 3 additions and 3 deletions

View File

@ -104,5 +104,5 @@ SYMBOL: error-counter
] unit-test ] unit-test
[ 3 ] [ always-counter get ] unit-test [ 3 ] [ always-counter get ] unit-test
[ 2 ] [ error-counter get ] unit-test [ 1 ] [ error-counter get ] unit-test
] with-scope ] with-scope

View File

@ -127,8 +127,8 @@ PRIVATE>
>r (catch) r> ifcc ; inline >r (catch) r> ifcc ; inline
: cleanup ( try cleanup-always cleanup-error -- ) : cleanup ( try cleanup-always cleanup-error -- )
>r [ compose (catch) ] keep r> compose over >r compose [ dip rethrow ] curry
[ dip rethrow ] curry ifcc ; inline >r (catch) r> ifcc r> call ; inline
: attempt-all ( seq quot -- obj ) : attempt-all ( seq quot -- obj )
[ [