I am trying to get robust error handling in place with code that may be in a callback from LuaBridge or may not. Is there any way to tell if LuaBridge called my code? That is, if LuaBridge is somewhere higher on the stack? Conceptually I would like to do this:
void error_handler(luabridge::LuaException &e)
{
if (<called-by-LuaBridge>)
throw e; // let LuaBridge and Lua error-handling handle it
display_message_to_user(e.what());
lua_close(e.state());
}