add src:line information to 'msg' */
| 627 | |
| 628 | /* add src:line information to 'msg' */ |
| 629 | const 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 | |
| 641 | l_noret luaG_errormsg (lua_State *L) { |
no test coverage detected