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

Function seterrorobj

third-party/lua-5.2.4/src/ldo.c:84–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83
84static void seterrorobj (lua_State *L, int errcode, StkId oldtop) {
85 switch (errcode) {
86 case LUA_ERRMEM: { /* memory error? */
87 setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */
88 break;
89 }
90 case LUA_ERRERR: {
91 setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling"));
92 break;
93 }
94 default: {
95 setobjs2s(L, oldtop, L->top - 1); /* error message on current top */
96 break;
97 }
98 }
99 L->top = oldtop + 1;
100}
101
102
103l_noret luaD_throw (lua_State *L, int errcode) {

Callers 3

recoverFunction · 0.70
lua_resumeFunction · 0.70
luaD_pcallFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected