MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / luaL_where

Function luaL_where

Source/Misc/lua/src/lua.c:10285–10295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10283
10284
10285LUALIB_API void luaL_where (lua_State *L, int level) {
10286lua_Debug ar;
10287if (lua_getstack(L, level, &ar)) { /* check function at level */
10288lua_getinfo(L, "Sl", &ar); /* get info about it */
10289if (ar.currentline > 0) { /* is there info? */
10290lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);
10291return;
10292}
10293}
10294lua_pushliteral(L, ""); /* else, no information available... */
10295}
10296
10297
10298LUALIB_API int luaL_error (lua_State *L, const char *fmt, ...) {

Callers 3

luaL_errorFunction · 0.85
luaB_errorFunction · 0.85
luaB_auxwrapFunction · 0.85

Calls 3

lua_getstackFunction · 0.85
lua_getinfoFunction · 0.85
lua_pushfstringFunction · 0.85

Tested by

no test coverage detected