[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Missing error message in panic handler / calling luaD_throw without error message on stack
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 10 Nov 2014 14:18:47 -0200
> > Thank you for this information. I might just push an error string on
> > top of the stack as a workaround before calling lua_newuserdata() until
> > this bug has been fixed.
>
> An even better solution would be to use lua_pushcfunction + lua_pcall
> so you don't get a panic at all. A panic should not be considered a
> routine error handling mechanism, IMO.
That is certainly the better/recommended practice (e.g., lua.c uses this
technique).
-- Roberto