lua-users home
lua-l archive

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

On 18 March 2011 09:57, Luiz Henrique de Figueiredo
<> wrote:
> BTW, we plan to release Lua 5.1.5 with this patch "soon".
> If you have any other bugs 5.1.4 to report, please do so now.
> Thanks.
> --lhf

xpcall does not handle ERRERR how it should.
The error handler for the error handler is itself; not the upper scope
as you would imagine.

a=function() error("a") end
b=function(e) print("b",e) end

This bug stops you from being able to bubble up errors.

a = function() error{type="foo"} end
xpcall(a,function(err) if err.type == "bar" then else error(err) end end)

==> you'd imagine that the error in the error handler would re-throw the error.