Skip to content

Is it possible to know if LuaBridge called my code #295

@rpatters1

Description

@rpatters1

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());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions