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

Function lua_set_run_error

src/Chain/libraries/glua/ldebug.cpp:86–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86LUA_API void lua_set_run_error(lua_State *L, const char *msg)
87{
88 if (nullptr != msg && strlen(msg) > 0)
89 {
90 auto size = strlen(msg);
91 if (size >= LUA_VM_EXCEPTION_STRNG_MAX_LENGTH)
92 size = LUA_VM_EXCEPTION_STRNG_MAX_LENGTH - 1;
93 strncpy(L->runerror, msg, LUA_VM_EXCEPTION_STRNG_MAX_LENGTH);
94 L->runerror[size] = '\0';
95 global_glua_chain_api->throw_exception(L, THINKYOUNG_API_SIMPLE_ERROR, msg);
96 }
97}
98
99
100

Callers 4

luaG_errormsgFunction · 0.85
luaB_tointegerFunction · 0.85
luaB_exitFunction · 0.85

Calls 1

throw_exceptionMethod · 0.45

Tested by

no test coverage detected