[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: state of the Lua nation on resource cleanup
- From: Leo Razoumov <slonik.az@...>
- Date: Tue, 20 Jan 2009 18:17:53 -0500
On 1/20/09, Asko Kauppi <firstname.lastname@example.org> wrote:
> Last time I checked, the Lua 'error' mechanism was plenty enough.
> In other words, what exactly does it _not_ cover, in your and/or David's
> opinion? Give us a list.
Not quite. In Lua I am missing Ruby's "ensure" clause.
Let say my Lua script creates a temporary directory and populates it
with some files. At the end this directory together with all those
files has to be removed. How to achieve such assurances short of
wrapping everything else in a pcall (xpcall)?