lua-users home
lua-l archive

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


> > 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