| 5124 | |
| 5125 | |
| 5126 | void luaG_errormsg (lua_State *L) { |
| 5127 | if (L->errfunc != 0) { /* is there an error handling function? */ |
| 5128 | StkId errfunc = restorestack(L, L->errfunc); |
| 5129 | if (!ttisfunction(errfunc)) luaD_throw(L, LUA_ERRERR); |
| 5130 | setobjs2s(L, L->top, L->top - 1); /* move argument */ |
| 5131 | setobjs2s(L, L->top - 1, errfunc); /* push function */ |
| 5132 | incr_top(L); |
| 5133 | luaD_call(L, L->top - 2, 1); /* call it */ |
| 5134 | } |
| 5135 | luaD_throw(L, LUA_ERRRUN); |
| 5136 | } |
| 5137 | |
| 5138 | |
| 5139 | void luaG_runerror (lua_State *L, const char *fmt, ...) { |
no test coverage detected