add src:line information to 'msg' */
| 821 | |
| 822 | /* add src:line information to 'msg' */ |
| 823 | const char *luaG_addinfo (lua_State *L, const char *msg, TString *src, |
| 824 | int line) { |
| 825 | char buff[LUA_IDSIZE]; |
| 826 | if (src) |
| 827 | luaO_chunkid(buff, getstr(src), tsslen(src)); |
| 828 | else { /* no source available; use "?" instead */ |
| 829 | buff[0] = '?'; buff[1] = '\0'; |
| 830 | } |
| 831 | return luaO_pushfstring(L, "%s:%d: %s", buff, line, msg); |
| 832 | } |
| 833 | |
| 834 | |
| 835 | l_noret luaG_errormsg (lua_State *L) { |
no test coverage detected