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

Function report

depends/lua/src/lua.c:166–173  ·  view source on GitHub ↗

** Check whether 'status' is not OK and, if so, prints the error ** message on the top of the stack. It assumes that the error object ** is a string, as it was either generated by Lua or by 'msghandler'. */

Source from the content-addressed store, hash-verified

164** is a string, as it was either generated by Lua or by 'msghandler'.
165*/
166static int report (lua_State *L, int status) {
167 if (status != LUA_OK) {
168 const char *msg = lua_tostring(L, -1);
169 l_message(progname, msg);
170 lua_pop(L, 1); /* remove message */
171 }
172 return status;
173}
174
175
176/*

Callers 5

dochunkFunction · 0.70
dolibraryFunction · 0.70
doREPLFunction · 0.70
handle_scriptFunction · 0.70
mainFunction · 0.70

Calls 1

l_messageFunction · 0.85

Tested by

no test coverage detected