MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaD_seterrorobj

Function luaD_seterrorobj

lua/ldo.c:52–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51
52void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) {
53 switch (errcode) {
54 case LUA_ERRMEM: {
55 setsvalue2s(L, oldtop, luaS_newliteral(L, MEMERRMSG));
56 break;
57 }
58 case LUA_ERRERR: {
59 setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling"));
60 break;
61 }
62 case LUA_ERRSYNTAX:
63 case LUA_ERRRUN: {
64 setobjs2s(L, oldtop, L->top - 1); /* error message on current top */
65 break;
66 }
67 }
68 L->top = oldtop + 1;
69}
70
71
72static void restore_stack_limit (lua_State *L) {

Callers 3

resetstackFunction · 0.85
lua_resumeFunction · 0.85
luaD_pcallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected