[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Modifing try-catch statement
- From: David Manura <dm.lua@...>
- Date: Sat, 18 Sep 2010 09:15:44 -0400
On Sat, Sep 18, 2010 at 1:24 AM, Ted Unangst <ted.unangst@gmail.com> wrote:
> Calling error in xpcall results in a stack overflow, because the error
> handler is still in effect while it's running. This is arguably a
> bug. The manual says it calls f in protected mode, but doesn't say
> the same about err.
Though it doesn't say explicitly, and maybe it should, the behavior of
xpcall I think is implied by lua_pcall, which can return LUA_ERRERR
"error while running the error handler function."