MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaD_seterrorobj

Function luaD_seterrorobj

third-party/lua-5.4.6/src/ldo.c:91–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) {
92 switch (errcode) {
93 case LUA_ERRMEM: { /* memory error? */
94 setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */
95 break;
96 }
97 case LUA_OK: { /* special case only for closing upvalues */
98 setnilvalue(s2v(oldtop)); /* no error message */
99 break;
100 }
101 default: {
102 lua_assert(errorstatus(errcode)); /* real error */
103 setobjs2s(L, oldtop, L->top.p - 1); /* error message on current top */
104 break;
105 }
106 }
107 L->top.p = oldtop + 1;
108}
109
110
111l_noret luaD_throw (lua_State *L, int errcode) {

Callers 5

luaE_resetthreadFunction · 0.70
prepcallclosemthFunction · 0.70
finishpcallkFunction · 0.70
lua_resumeFunction · 0.70
luaD_pcallFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected