lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Jan 22, 2013, at 10:03 AM, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> 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) ?

-Noah