[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: protected environments and errors
- From: Albert-Jan Brouwer <acj.brouwer@...>
- Date: Tue, 26 Aug 2003 15:57:47 +0200
In the 5.0 reference manual, lua_pcall() is said to return LUA_ERRRUN
in case of a runtime error and LUA_ERRMEM in case of a memory
Is it safe to assume that the lua state is still consistent when a memory
allocation error occurs inside a protected environment?
If so, is there some other reason why there should be different handling
of either type of error? (aside from the optional errfunc not being called)
Does lua_resume() return the same error codes as lua_pcall()?
When lua_resume() has returned an error, should the thread be
considered inconsistent or is it still possible to do a lua_loadbuffer
If not, and error handling must be done after a failed resume, can a
new thread (created with lua_newthread) access the global variables
set during the execution of the defunct thread?