[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Dealing With Errors in Lua
- From: Paul K <paulclinger@...>
- Date: Sat, 28 Sep 2013 15:13:59 -0700
> As a compulsive parser hacker, this is something I've certainly thought about doing. But,
> I'm actually not convinced it's worth the trouble. If all you want it try/catch, I feel like
> function wrapping is generally sufficient, for example:
I like guard/finalize syntax better than try/catch:
http://lua-users.org/lists/lua-l/2008-02/msg00243.html (this event
includes a patch against one of Lua 5.1 versions). Also related links
on deterministic resource cleanup
(http://john.neggie.net/2009/lua/resource_finalization), finalizers
(http://lua-users.org/lists/lua-l/2009-08/msg00051.html), resource
cleanup (http://lua-users.org/lists/lua-l/2009-01/msg00333.html), and
a more recent follow-up on guard/finalize
(http://lua-users.org/lists/lua-l/2011-02/msg01405.html).
Paul.