add src:line information to 'msg' */
| 824 | |
| 825 | /* add src:line information to 'msg' */ |
| 826 | const 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 | |
| 840 | l_noret luaG_errormsg (lua_State *L) { |
no test coverage detected