MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaG_addinfo

Function luaG_addinfo

3rd/lua-5.4.3/src/ldebug.c:753–762  ·  view source on GitHub ↗

add src:line information to 'msg' */

Source from the content-addressed store, hash-verified

751
752/* add src:line information to 'msg' */
753const char *luaG_addinfo (lua_State *L, const char *msg, TString *src,
754 int line) {
755 char buff[LUA_IDSIZE];
756 if (src)
757 luaO_chunkid(buff, getstr(src), tsslen(src));
758 else { /* no source available; use "?" instead */
759 buff[0] = '?'; buff[1] = '\0';
760 }
761 return luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
762}
763
764
765l_noret luaG_errormsg (lua_State *L) {

Callers 2

lexerrorFunction · 0.85
luaG_runerrorFunction · 0.85

Calls 2

luaO_chunkidFunction · 0.85
luaO_pushfstringFunction · 0.85

Tested by

no test coverage detected