MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaD_seterrorobj

Function luaD_seterrorobj

deps/lua/src/ldo.c:51–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50
51void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) {
52 switch (errcode) {
53 case LUA_ERRMEM: {
54 setsvalue2s(L, oldtop, luaS_newliteral(L, MEMERRMSG));
55 break;
56 }
57 case LUA_ERRERR: {
58 setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling"));
59 break;
60 }
61 case LUA_ERRSYNTAX:
62 case LUA_ERRRUN: {
63 setobjs2s(L, oldtop, L->top - 1); /* error message on current top */
64 break;
65 }
66 }
67 L->top = oldtop + 1;
68}
69
70
71static void restore_stack_limit (lua_State *L) {

Callers 3

resetstackFunction · 0.85
lua_resumeFunction · 0.85
luaD_pcallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected