lua-users home
lua-l archive

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


Title: Re: try..catch in Lua
Could it be extended to also handle:

    try
        ...
    finally
        ...
    end

Mark

on 1/28/08 9:59 PM, Hu Qiwei at huqiwei@gmail.com wrote:

I've tried it, and the answer is YES.

On Jan 29, 2008 1:53 PM, steve donovan <steve.j.donovan@gmail.com> wrote:
This is cool, try..catch (or except) is definitely something that
should be in the core.

Does it handle returns from enclosing function properly? (Especially
_multiple_ returns!)

function boo()
 try
    ...
    return 'yes','no','maybe'
 catch err do
    ...
 end
end

steve d.