MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaG_addinfo

Function luaG_addinfo

third-party/lua-5.5.0/src/ldebug.c:826–837  ·  view source on GitHub ↗

add src:line information to 'msg' */

Source from the content-addressed store, hash-verified

824
825/* add src:line information to 'msg' */
826const char *luaG_addinfo (lua_State *L, const char *msg, TString *src,
827 int line) {
828 if (src == NULL) /* no debug information? */
829 return luaO_pushfstring(L, "?:?: %s", msg);
830 else {
831 char buff[LUA_IDSIZE];
832 size_t idlen;
833 const char *id = getlstr(src, idlen);
834 luaO_chunkid(buff, id, idlen);
835 return luaO_pushfstring(L, "%s:%d: %s", buff, line, msg);
836 }
837}
838
839
840l_noret luaG_errormsg (lua_State *L) {

Callers 2

lexerrorFunction · 0.70
luaG_runerrorFunction · 0.70

Calls 2

luaO_pushfstringFunction · 0.70
luaO_chunkidFunction · 0.70

Tested by

no test coverage detected