If the python callback throws an error, the c++ code will throw a py::error_already_set that needs to be caught and handled in the c++ code . This change is inspired by the similar solution in PySymbolTable::walkSymbolTables.
If the python callback throws an error, the c++ code will throw a py::error_already_set that needs to be caught and handled in the c++ code . This change is inspired by the similar solution in PySymbolTable::walkSymbolTables.