MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaG_addinfo

Function luaG_addinfo

depends/lua/src/ldebug.c:629–638  ·  view source on GitHub ↗

add src:line information to 'msg' */

Source from the content-addressed store, hash-verified

627
628/* add src:line information to 'msg' */
629const char *luaG_addinfo (lua_State *L, const char *msg, TString *src,
630 int line) {
631 char buff[LUA_IDSIZE];
632 if (src)
633 luaO_chunkid(buff, getstr(src), LUA_IDSIZE);
634 else { /* no source available; use "?" instead */
635 buff[0] = '?'; buff[1] = '\0';
636 }
637 return luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
638}
639
640
641l_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