MCPcopy Create free account
hub / github.com/DFHack/dfhack / report_error

Function report_error

library/LuaTools.cpp:558–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

556}
557
558static void report_error(lua_State *L, color_ostream *out = NULL, bool pop = false)
559{
560 error_tostring(L, true);
561
562 const char *msg = lua_tostring(L, -1);
563 assert(msg);
564
565 if (out)
566 out->printerr("{}\n", msg);
567 else
568 dfhack_printerr(L, msg);
569
570 lua_pop(L, pop?2:1);
571}
572
573static bool convert_to_exception(lua_State *L, int slevel, lua_State *thread = NULL)
574{

Callers 6

safecall_contFunction · 0.85
SafeCallMethod · 0.85
dfhack_saferesumeFunction · 0.85
SafeResumeMethod · 0.85
SafeCallStringMethod · 0.85
do_invoke_eventFunction · 0.85

Calls 2

error_tostringFunction · 0.85
dfhack_printerrFunction · 0.85

Tested by

no test coverage detected