[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: State usability after panic
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 5 Dec 2011 12:57:42 -0200
> 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."