lua_atpanic

Sets a new panic function

extern (C) @nogc nothrow
lua_atpanic

Parameters

s lua_State*

Lua state

func lua_CFunction

C lua_State registered function

Return Value

the old panic functio

Note: The panic function can access the error message at the top of the stack. 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).

See Also

Meta