MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaD_seterrorobj

Function luaD_seterrorobj

extlibs/lua/src/ldo.c:91–111  ·  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_ERRERR: {
98 setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling"));
99 break;
100 }
101 case CLOSEPROTECT: {
102 setnilvalue(s2v(oldtop)); /* no error message */
103 break;
104 }
105 default: {
106 setobjs2s(L, oldtop, L->top - 1); /* error message on current top */
107 break;
108 }
109 }
110 L->top = oldtop + 1;
111}
112
113
114l_noret luaD_throw (lua_State *L, int errcode) {

Callers 7

lua_resetthreadFunction · 0.85
callclosemthFunction · 0.85
luaF_newtbcupvalFunction · 0.85
luaD_throwFunction · 0.85
recoverFunction · 0.85
lua_resumeFunction · 0.85
luaD_pcallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected