MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / seterrorobj

Function seterrorobj

libraries/AP_Scripting/lua/src/ldo.c:92–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92static void seterrorobj (lua_State *L, int errcode, StkId oldtop) {
93 switch (errcode) {
94 case LUA_ERRMEM: { /* memory error? */
95 setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */
96 break;
97 }
98 case LUA_ERRERR: {
99 setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling"));
100 break;
101 }
102 default: {
103 setobjs2s(L, oldtop, L->top - 1); /* error message on current top */
104 break;
105 }
106 }
107 L->top = oldtop + 1;
108}
109
110
111l_noret luaD_throw (lua_State *L, int errcode) {

Callers 4

luaD_throwFunction · 0.85
recoverFunction · 0.85
lua_resumeFunction · 0.85
luaD_pcallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected