MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaL_where

Function luaL_where

deps/lua/src/lauxlib.c:73–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72
73LUALIB_API void luaL_where (lua_State *L, int level) {
74 lua_Debug ar;
75 if (lua_getstack(L, level, &ar)) { /* check function at level */
76 lua_getinfo(L, "Sl", &ar); /* get info about it */
77 if (ar.currentline > 0) { /* is there info? */
78 lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);
79 return;
80 }
81 }
82 lua_pushliteral(L, ""); /* else, no information available... */
83}
84
85
86LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) {

Callers 3

luaB_errorFunction · 0.85
luaB_auxwrapFunction · 0.85
luaL_errorFunction · 0.85

Calls 3

lua_getstackFunction · 0.85
lua_getinfoFunction · 0.85
lua_pushfstringFunction · 0.85

Tested by

no test coverage detected