lua-users home
lua-l archive

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


> >lua_error function calls C exit function.  Can I avoid it without
modyfing
> >code?
>
> No.
> If an error occurs during the execution of a chunk, then the execution is
> interrupted and exit() is not called.
> If lua_error is called by the host program directly or by the API when
something
> goes wrong, then it does exit().
> What else could Lua do in this case?

Probably exit() it the only right thing to do in this case, I agree.
My problem was, that I run many interpreters in separate threads and such
exit() exits entire program.
But - don't bother.  As you said, this happens when I call API from C.
Actually this was "indexed expression not a table".  I've added proper
checking of parameters before calling lua_settable - that's enough for me.

Thanks,
Maciej