MCPcopy Create free account
hub / github.com/DFHack/dfhack / seterrorobj

Function seterrorobj

depends/lua/src/ldo.c:91–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91static void 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 default: {
102 setobjs2s(L, oldtop, L->top - 1); /* error message on current top */
103 break;
104 }
105 }
106 L->top = oldtop + 1;
107}
108
109
110l_noret 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