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

Function luaG_addinfo

extlibs/lua/src/ldebug.c:744–753  ·  view source on GitHub ↗

add src:line information to 'msg' */

Source from the content-addressed store, hash-verified

742
743/* add src:line information to 'msg' */
744const char *luaG_addinfo (lua_State *L, const char *msg, TString *src,
745 int line) {
746 char buff[LUA_IDSIZE];
747 if (src)
748 luaO_chunkid(buff, getstr(src), tsslen(src));
749 else { /* no source available; use "?" instead */
750 buff[0] = '?'; buff[1] = '\0';
751 }
752 return luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
753}
754
755
756l_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