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

Function get_error_object_message

libraries/AP_Scripting/lua_scripts.cpp:44–50  ·  view source on GitHub ↗

return string error message for error object at top of stack

Source from the content-addressed store, hash-verified

42
43// return string error message for error object at top of stack
44static const char *get_error_object_message(lua_State *L) {
45 const char *m = lua_tostring(L, -1);
46 if (!m) { // error object is not stringifiable
47 return "<error>";
48 }
49 return m;
50}
51
52lua_scripts::lua_scripts(const AP_Int32 &vm_steps, const AP_Int32 &heap_size, AP_Int8 &debug_options)
53 : _vm_steps(vm_steps),

Callers 3

atpanicMethod · 0.85
load_scriptMethod · 0.85
run_next_scriptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected