Merge pull request #15669 from marioalexis84/fem-link_scope_python_objects

Fem: Fix link scope for Python objects
This commit is contained in:
Chris Hennes
2024-08-05 10:53:50 -05:00
committed by GitHub
15 changed files with 144 additions and 58 deletions

View File

@@ -423,6 +423,10 @@ void Application::setupPythonException(PyObject* module)
Base::PyExc_FC_CADKernelError = PyErr_NewException("Base.CADKernelError", Base::PyExc_FC_GeneralError, nullptr);
Py_INCREF(Base::PyExc_FC_CADKernelError);
PyModule_AddObject(module, "CADKernelError", Base::PyExc_FC_CADKernelError);
Base::PyExc_FC_PropertyError = PyErr_NewException("Base.PropertyError", PyExc_AttributeError, nullptr);
Py_INCREF(Base::PyExc_FC_PropertyError);
PyModule_AddObject(module, "PropertyError", Base::PyExc_FC_PropertyError);
}
// clang-format on
@@ -2184,6 +2188,7 @@ void Application::initTypes()
new Base::ExceptionProducer<Base::UnitsMismatchError>;
new Base::ExceptionProducer<Base::CADKernelError>;
new Base::ExceptionProducer<Base::RestoreError>;
new Base::ExceptionProducer<Base::PropertyError>;
}
namespace {