| 1664 | } |
| 1665 | |
| 1666 | static void stack_trace(lua_State *lua) |
| 1667 | { |
| 1668 | lua_getfield(lua, LUA_GLOBALSINDEX, "debug"); |
| 1669 | if (!lua_istable(lua, -1)) { |
| 1670 | lua_pop(lua, 1); |
| 1671 | return; |
| 1672 | } |
| 1673 | lua_getfield(lua, -1, "traceback"); |
| 1674 | if (!lua_isfunction(lua, -1)) { |
| 1675 | lua_pop(lua, 2); |
| 1676 | return; |
| 1677 | } |
| 1678 | lua_pushvalue(lua, 1); |
| 1679 | lua_pushinteger(lua, 2); |
| 1680 | lua_call(lua, 2, 1); |
| 1681 | logmsg(LOGMSG_USER, "\n"); |
| 1682 | } |
| 1683 | |
| 1684 | static char *no_such_procedure(const char *name, struct spversion_t *spversion) |
| 1685 | { |
no test coverage detected