| 572 | |
| 573 | |
| 574 | static void addinfo (lua_State *L, const char *msg) { |
| 575 | CallInfo *ci = L->ci; |
| 576 | if (isLua(ci)) { /* is Lua code? */ |
| 577 | char buff[LUA_IDSIZE]; /* add file:line information */ |
| 578 | int line = currentline(ci); |
| 579 | TString *src = ci_func(ci)->p->source; |
| 580 | if (src) |
| 581 | luaO_chunkid(buff, getstr(src), LUA_IDSIZE); |
| 582 | else { /* no source available; use "?" instead */ |
| 583 | buff[0] = '?'; buff[1] = '\0'; |
| 584 | } |
| 585 | luaO_pushfstring(L, "%s:%d: %s", buff, line, msg); |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | |
| 590 | l_noret luaG_errormsg (lua_State *L) { |
no test coverage detected