| 209 | } |
| 210 | |
| 211 | static int luaB_exit(lua_State *L) { |
| 212 | if (lua_gettop(L) < 1 || !lua_isstring(L, -1)) |
| 213 | { |
| 214 | global_glua_chain_api->throw_exception(L, THINKYOUNG_API_THROW_ERROR, "empty error"); |
| 215 | // thinkyoung::lua::lib::notify_lua_state_stop(L); |
| 216 | return 0; |
| 217 | } |
| 218 | const char *msg = luaL_checkstring(L, -1); |
| 219 | lua_set_run_error(L, msg); |
| 220 | global_glua_chain_api->throw_exception(L, THINKYOUNG_API_THROW_ERROR, msg); |
| 221 | L->force_stopping = true; |
| 222 | // thinkyoung::lua::lib::notify_lua_state_stop(L); |
| 223 | return 0; |
| 224 | } |
| 225 | |
| 226 | static int luaB_getmetatable(lua_State *L) { |
| 227 | luaL_checkany(L, 1); |
nothing calls this directly
no test coverage detected