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

Function db_traceback

src/Chain/libraries/glua/ldblib.cpp:416–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414
415
416static int db_traceback(lua_State *L) {
417 int arg;
418 lua_State *L1 = getthread(L, &arg);
419 const char *msg = lua_tostring(L, arg + 1);
420 if (msg == nullptr && !lua_isnoneornil(L, arg + 1)) /* non-string 'msg'? */
421 lua_pushvalue(L, arg + 1); /* return it untouched */
422 else {
423 int level = (int)luaL_optinteger(L, arg + 2, (L == L1) ? 1 : 0);
424 luaL_traceback(L, L1, msg, level);
425 }
426 return 1;
427}
428
429
430static const luaL_Reg dblib[] = {

Callers

nothing calls this directly

Calls 3

getthreadFunction · 0.85
lua_pushvalueFunction · 0.85
luaL_tracebackFunction · 0.85

Tested by

no test coverage detected