[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Incorrect handling of LUA_ERRERR in xpcall
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 7 Oct 2010 00:24:30 -0300
> The stock lua implementation's xpcall doesn't handle an error in the
> error handler how you'd think: it keeps calling itself until it blows
> the stack.
> The expected behaviour would be to propogate the error up to the next
> protected call (IMO)
> luajit doesn't recursivly call xpcall, but the xpcall instead just
> returns "error in error handling".
The stock interpreter also prints this in the end:
> > function f() error("hi") end; function e(...) print(...) error("err") end
> > print(xpcall(f,e))
stdin:1: hi
stdin:1: err
...
stdin:1: err
false error in error handling