| 197 | |
| 198 | |
| 199 | static int luaB_error(lua_State *L) { |
| 200 | int level = (int)luaL_optinteger(L, 2, 1); |
| 201 | lua_settop(L, 1); |
| 202 | if (lua_isstring(L, 1) && level > 0) { /* add extra information? */ |
| 203 | luaL_where(L, level); |
| 204 | lua_pushvalue(L, 1); |
| 205 | lua_concat(L, 2); |
| 206 | } |
| 207 | global_glua_chain_api->throw_exception(L, THINKYOUNG_API_THROW_ERROR, luaL_checkstring(L, 1)); |
| 208 | return lua_error(L); |
| 209 | } |
| 210 | |
| 211 | static int luaB_exit(lua_State *L) { |
| 212 | if (lua_gettop(L) < 1 || !lua_isstring(L, -1)) |
no test coverage detected