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

Function db_traceback

third-party/lua-5.2.4/src/ldblib.c:369–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367
368
369static int db_traceback (lua_State *L) {
370 int arg;
371 lua_State *L1 = getthread(L, &arg);
372 const char *msg = lua_tostring(L, arg + 1);
373 if (msg == NULL && !lua_isnoneornil(L, arg + 1)) /* non-string 'msg'? */
374 lua_pushvalue(L, arg + 1); /* return it untouched */
375 else {
376 int level = luaL_optint(L, arg + 2, (L == L1) ? 1 : 0);
377 luaL_traceback(L, L1, msg, level);
378 }
379 return 1;
380}
381
382
383static const luaL_Reg dblib[] = {

Callers

nothing calls this directly

Calls 3

getthreadFunction · 0.70
lua_pushvalueFunction · 0.70
luaL_tracebackFunction · 0.70

Tested by

no test coverage detected