[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Trigger panic for testing custom error handler
- From: Noah Watkins <jayhawk@...>
- Date: Tue, 22 Jan 2013 10:09:34 -0800
On Jan 22, 2013, at 10:03 AM, Luiz Henrique de Figueiredo <email@example.com> wrote:
>> Thanks. If I understand the concepts correctly, then I can use the panic handler to avoid the host application from exiting in cases where Lua is unrecoverable (as opposed to normal errors that might occur when executing a script, such as syntax errors)?
> If you start all Lua transactions using lua_pcall then you can catch all errors.
What about failures that occur prior to a lua_pcall, such as a memory allocation failure during setup: create new state, luaL_loadstring (memory allocation error) ?