MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / luaG_addinfo

Function luaG_addinfo

xrepo/packages/l/lua/port/lua/src/ldebug.c:794–803  ·  view source on GitHub ↗

add src:line information to 'msg' */

Source from the content-addressed store, hash-verified

792
793/* add src:line information to 'msg' */
794const char *luaG_addinfo (lua_State *L, const char *msg, TString *src,
795 int line) {
796 char buff[LUA_IDSIZE];
797 if (src)
798 luaO_chunkid(buff, getstr(src), tsslen(src));
799 else { /* no source available; use "?" instead */
800 buff[0] = '?'; buff[1] = '\0';
801 }
802 return luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
803}
804
805
806l_noret luaG_errormsg (lua_State *L) {

Callers 2

lexerrorFunction · 0.85
luaG_runerrorFunction · 0.85

Calls 2

luaO_chunkidFunction · 0.70
luaO_pushfstringFunction · 0.70

Tested by

no test coverage detected