MCPcopy Create free account
hub / github.com/SnowyMouse/chimera / print_error

Function print_error

src/chimera/lua/lua_script.cpp:214–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212 }
213
214 void print_error(lua_State *state) noexcept {
215 std::string error = lua_tostring(state, -1);
216 std::stringstream ss(error);
217 std::string line;
218 while(std::getline(ss, line, '\n')) {
219 console_error(line.c_str());
220 }
221 lua_pop(state, 1);
222 }
223
224 LuaScript::LuaScript(lua_State *state, const char *name, const bool &global, const bool &sandbox) noexcept : state(state), name(name), sandbox(sandbox), global(global) {}
225

Callers 3

load_lua_scriptFunction · 0.85
~LuaScriptMethod · 0.85
pcallFunction · 0.85

Calls 1

console_errorFunction · 0.85

Tested by

no test coverage detected