| 643 | |
| 644 | |
| 645 | void luaG_errormsg(lua_State *L, const char *msg) { |
| 646 | if (L->errfunc != 0) { /* is there an error handling function? */ |
| 647 | StkId errfunc = restorestack(L, L->errfunc); |
| 648 | setobjs2s(L, L->top, L->top - 1); /* move argument */ |
| 649 | setobjs2s(L, L->top - 1, errfunc); /* push function */ |
| 650 | L->top++; /* assume EXTRA_STACK */ |
| 651 | luaD_callnoyield(L, L->top - 2, 1); /* call it */ |
| 652 | } |
| 653 | if(nullptr != msg) |
| 654 | lua_set_run_error(L, msg); |
| 655 | luaD_throw(L, LUA_ERRRUN); |
| 656 | } |
| 657 | |
| 658 | |
| 659 | void luaG_runerror(lua_State *L, const char *fmt, ...) { |
no test coverage detected