MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / propagateErrorWithTraceback

Method propagateErrorWithTraceback

source/core/StarLua.cpp:755–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

753}
754
755void LuaEngine::propagateErrorWithTraceback(lua_State* from, lua_State* to) {
756 if (const char* error = lua_tostring(from, -1)) {
757 luaL_traceback(to, from, error, 0); // error + traceback
758 lua_pop(from, 1);
759 } else {
760 lua_xmove(from, to, 1); // just error, no traceback
761 }
762}
763
764char const* LuaEngine::stringPtr(int handleIndex) {
765 return lua_tostring(m_handleThread, handleIndex);

Callers

nothing calls this directly

Calls 2

luaL_tracebackFunction · 0.85
lua_xmoveFunction · 0.85

Tested by

no test coverage detected