MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaG_addinfo

Function luaG_addinfo

lib/lua/src/ldebug.c:814–823  ·  view source on GitHub ↗

add src:line information to 'msg' */

Source from the content-addressed store, hash-verified

812
813/* add src:line information to 'msg' */
814const char *luaG_addinfo (lua_State *L, const char *msg, TString *src,
815 int line) {
816 char buff[LUA_IDSIZE];
817 if (src)
818 luaO_chunkid(buff, getstr(src), tsslen(src));
819 else { /* no source available; use "?" instead */
820 buff[0] = '?'; buff[1] = '\0';
821 }
822 return luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
823}
824
825
826l_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