[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 2nd version: try..catch for Lua, now 'finally' supported
- From: "alex.mania@..." <alex.mania@...>
- Date: Thu, 31 Jan 2008 12:32:00 +0900
I'm definitely going to have a look at the patch... I was thwarted in my own
attempts to add a try finally because I had no idea how to handle returns, eg:
function foo(...)
local x, y = 1, 2
try
return x or y, ...
finally
x = nil
end
end
print(foo(2, 3, 4))
-- 1 2 3 4 ?
Congratulations is all I can say...
- Alex