[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: State usability after panic
- From: Mak Nazečić-Andrlon <owlberteinstein@...>
- Date: Tue, 6 Dec 2011 11:27:46 +0100
Hm, that's interesting. But doesn't the debug API manipulate the
stack? And, again, is calling lua_close() on the state OK?
On Mon, Dec 5, 2011 at 3:57 PM, Luiz Henrique de Figueiredo
>> Hello, again! What is the state of the usability of the Lua state
>> after a panic? Is it at least safe to close? Is there any behavior I
>> can rely on?
> The manual for 5.1 does not say much about this:
> "The panic function can access the error message at the top of the stack."
> The manual for 5.2 says a bit more, which I think applies to 5.1 as well:
> "The panic function should not try to run anything on the failed Lua state.
> However, it can still use the debug API (see §4.9) to gather information
> about the state. In particular, the error message is at the top of the stack."