"Alan Grover" wrote: > I noticed "the compensation closures are wrapped in > false-if-exception: this causes errors to be ignored > and all the closures to be evaluated." Could you revise > this to signal the exception? Silently consumption of > an exception is very frustrating, and surprising.
I have not coded this with the specific purpose of suppressing an exception: the purpose is to go on evaluating the other compensation closures even when one or more of them fail, that way the code tries to free resources as much as possible. If you have 5 resources, you free 2 successfully and the third free function fails: what do you do? If you raise an exception the last 2 resources will be leaked, unless you adopt a (IMHO) really complex architecture of context sharing in your program. I find this discussion similar to the one related to exception-raising object destructors in C++: if you throw an exception, there is no way to go back later and finish the destruction (a lot of papers/weblogs on the web about this). -- Marco Maggi _______________________________________________ Guile-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/guile-user
