Better documentation for LUA_ERRERR
Not all errors in a message handler generate a LUA_ERRERR.
This commit is contained in:
4
ldo.c
4
ldo.c
@@ -203,7 +203,7 @@ TStatus luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {
|
||||
#define ERRORSTACKSIZE (MAXSTACK + STACKERRSPACE)
|
||||
|
||||
|
||||
/* raise an error while running the message handler */
|
||||
/* raise a stack error while running the message handler */
|
||||
l_noret luaD_errerr (lua_State *L) {
|
||||
TString *msg = luaS_newliteral(L, "error in error handling");
|
||||
setsvalue2s(L, L->top.p, msg);
|
||||
@@ -339,7 +339,7 @@ int luaD_growstack (lua_State *L, int n, int raiseerror) {
|
||||
a stack error; cannot grow further than that. */
|
||||
lua_assert(stacksize(L) == ERRORSTACKSIZE);
|
||||
if (raiseerror)
|
||||
luaD_errerr(L); /* error inside message handler */
|
||||
luaD_errerr(L); /* stack error inside message handler */
|
||||
return 0; /* if not 'raiseerror', just signal it */
|
||||
}
|
||||
else if (n < MAXSTACK) { /* avoids arithmetic overflows */
|
||||
|
||||
Reference in New Issue
Block a user