MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / seterrorobj

Function seterrorobj

src/Chain/libraries/glua/ldo.cpp:110–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108
109
110static void seterrorobj(lua_State *L, int errcode, StkId oldtop) {
111 switch (errcode) {
112 case LUA_ERRMEM: { /* memory error? */
113 setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */
114 break;
115 }
116 case LUA_ERRERR: {
117 setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling"));
118 break;
119 }
120 default: {
121 setobjs2s(L, oldtop, L->top - 1); /* error message on current top */
122 break;
123 }
124 }
125 L->top = oldtop + 1;
126}
127
128
129void luaD_throw(lua_State *L, int errcode) {

Callers 4

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