lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 1/20/09, Asko Kauppi <askok@dnainternet.net> 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.
>
>  -asko
>

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)?

--Leo--