lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I have a custom error handler installed using lua_atpanic. Is there a convenient way to trigger a panic in order to test/debug the handler?

Try

	lua_pushnil(L);
	lua_call(L,0,0);

But note that panic functions are not meant to be generic error handlers
for Lua, just a last-resort safety net for the app. In particular, the
Lua state in a panic function is not usable.