| 62 | } |
| 63 | |
| 64 | void lua_scripts::hook(lua_State *L, lua_Debug *ar) { |
| 65 | lua_scripts::overtime = true; |
| 66 | |
| 67 | // we need to aggressively bail out as we are over time |
| 68 | // so we will aggressively trap errors until we clear out |
| 69 | lua_sethook(L, hook, LUA_MASKCOUNT, 1); |
| 70 | |
| 71 | luaL_error(L, "Exceeded CPU time"); |
| 72 | } |
| 73 | |
| 74 | void lua_scripts::print_error(MAV_SEVERITY severity) { |
| 75 | error_msg_buf_sem.take_blocking(); |
nothing calls this directly
no test coverage detected