pub fn lua_atpanic(l: LuaState, panicf: LuaCFunction) -> LuaCFunctionExpand description
Sets a new panic function and returns the old one. If an error happens outside any protected environment, Lua calls a panic function and then calls exit(EXIT_FAILURE), thus exiting the host application. Your panic function can avoid this exit by never returning (e.g., doing a long jump). The panic function can access the error message at the top of the stack.
ยงReturns
The old panic function.