[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Cleaning up iterators
- From: Petite Abeille <petite.abeille@...>
- Date: Wed, 27 Jul 2011 19:37:27 +0200
On Jul 27, 2011, at 7:02 AM, Antonio Vieiro wrote:
> I know it's no so easy to use as a 'for' loop, but it's 'easier' for me to always close things no matter what I do.
In that case, you might be interested by the various try/catch/finalize mechanisms floating around.
For example, here is a take by Diego Nehab:
http://lua-users.org/wiki/FinalizedExceptions
Another example by Tom Harris:
http://whoopdedo.org/doku/lua/index
More reading:
http://lua-users.org/wiki/ErrorHandling