MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zcp_error_handler

Function zcp_error_handler

freebsd/contrib/openzfs/module/zfs/zcp.c:133–144  ·  view source on GitHub ↗

* The outer-most error callback handler for use with lua_pcall(). On * error Lua will call this callback with a single argument that * represents the error value. In most cases this will be a string * containing an error message, but channel programs can use Lua's * error() function to return arbitrary objects as errors. This callback * returns (on the Lua stack) the original error object alo

Source from the content-addressed store, hash-verified

131 * registered cleanup function here.
132 */
133static int
134zcp_error_handler(lua_State *state)
135{
136 const char *msg;
137
138 zcp_cleanup(state);
139
140 VERIFY3U(1, ==, lua_gettop(state));
141 msg = lua_tostring(state, 1);
142 luaL_traceback(state, state, msg, 1);
143 return (1);
144}
145
146int
147zcp_argerror(lua_State *state, int narg, const char *msg, ...)

Callers

nothing calls this directly

Calls 3

zcp_cleanupFunction · 0.85
luaL_tracebackFunction · 0.85
lua_gettopFunction · 0.50

Tested by

no test coverage detected