| 621 | |
| 622 | |
| 623 | void luaG_errormsg (lua_State *L) { |
| 624 | if (L->errfunc != 0) { /* is there an error handling function? */ |
| 625 | StkId errfunc = restorestack(L, L->errfunc); |
| 626 | if (!ttisfunction(errfunc)) luaD_throw(L, LUA_ERRERR); |
| 627 | setobjs2s(L, L->top, L->top - 1); /* move argument */ |
| 628 | setobjs2s(L, L->top - 1, errfunc); /* push function */ |
| 629 | incr_top(L); |
| 630 | luaD_call(L, L->top - 2, 1); /* call it */ |
| 631 | } |
| 632 | luaD_throw(L, LUA_ERRRUN); |
| 633 | } |
| 634 | |
| 635 | |
| 636 | void luaG_runerror (lua_State *L, const char *fmt, ...) { |
no test coverage detected