| 855 | |
| 856 | |
| 857 | l_noret luaG_runerror (lua_State *L, const char *fmt, ...) { |
| 858 | CallInfo *ci = L->ci; |
| 859 | const char *msg; |
| 860 | va_list argp; |
| 861 | luaC_checkGC(L); /* error message uses memory */ |
| 862 | pushvfstring(L, argp, fmt, msg); |
| 863 | if (isLua(ci)) { /* Lua function? */ |
| 864 | /* add source:line information */ |
| 865 | luaG_addinfo(L, msg, ci_func(ci)->p->source, getcurrentline(ci)); |
| 866 | setobjs2s(L, L->top.p - 2, L->top.p - 1); /* remove 'msg' */ |
| 867 | L->top.p--; |
| 868 | } |
| 869 | luaG_errormsg(L); |
| 870 | } |
| 871 | |
| 872 | |
| 873 | /* |
no test coverage detected