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

Function addinfo

third-party/lua-5.2.4/src/ldebug.c:574–587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572
573
574static void addinfo (lua_State *L, const char *msg) {
575 CallInfo *ci = L->ci;
576 if (isLua(ci)) { /* is Lua code? */
577 char buff[LUA_IDSIZE]; /* add file:line information */
578 int line = currentline(ci);
579 TString *src = ci_func(ci)->p->source;
580 if (src)
581 luaO_chunkid(buff, getstr(src), LUA_IDSIZE);
582 else { /* no source available; use "?" instead */
583 buff[0] = '?'; buff[1] = '\0';
584 }
585 luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
586 }
587}
588
589
590l_noret luaG_errormsg (lua_State *L) {

Callers 1

luaG_runerrorFunction · 0.70

Calls 3

currentlineFunction · 0.70
luaO_chunkidFunction · 0.70
luaO_pushfstringFunction · 0.70

Tested by

no test coverage detected