[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: exit() from Lua
- From: "Maciej Maczynski" <macmac@...>
- Date: Thu, 29 Jun 2000 11:24:29 -0000
> >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