MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaB_error

Function luaB_error

src/Chain/libraries/glua/lbaselib.cpp:199–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197
198
199static 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
211static int luaB_exit(lua_State *L) {
212 if (lua_gettop(L) < 1 || !lua_isstring(L, -1))

Callers 1

luaB_assertFunction · 0.85

Calls 7

lua_settopFunction · 0.85
lua_isstringFunction · 0.85
luaL_whereFunction · 0.85
lua_pushvalueFunction · 0.85
lua_concatFunction · 0.85
lua_errorFunction · 0.85
throw_exceptionMethod · 0.45

Tested by

no test coverage detected