Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError

This commit is contained in:
wmayer
2022-03-17 14:45:48 +01:00
parent d69defaa3c
commit 9160f06e1c
29 changed files with 114 additions and 114 deletions

View File

@@ -48,15 +48,15 @@ PyObject* FeaturePathCompoundPy::addObject(PyObject *args)
DocumentObjectPy* docObj = static_cast<DocumentObjectPy*>(object);
if (!docObj->getDocumentObjectPtr() || !docObj->getDocumentObjectPtr()->getNameInDocument()) {
PyErr_SetString(Base::BaseExceptionFreeCADError, "Cannot add an invalid object");
PyErr_SetString(Base::PyExc_FC_GeneralError, "Cannot add an invalid object");
return nullptr;
}
if (docObj->getDocumentObjectPtr()->getDocument() != getFeaturePathCompoundPtr()->getDocument()) {
PyErr_SetString(Base::BaseExceptionFreeCADError, "Cannot add an object from another document to this group");
PyErr_SetString(Base::PyExc_FC_GeneralError, "Cannot add an object from another document to this group");
return nullptr;
}
if (docObj->getDocumentObjectPtr() == this->getFeaturePathCompoundPtr()) {
PyErr_SetString(Base::BaseExceptionFreeCADError, "Cannot add a group object to itself");
PyErr_SetString(Base::PyExc_FC_GeneralError, "Cannot add a group object to itself");
return nullptr;
}
@@ -93,11 +93,11 @@ PyObject* FeaturePathCompoundPy::removeObject(PyObject *args)
DocumentObjectPy* docObj = static_cast<DocumentObjectPy*>(object);
if (!docObj->getDocumentObjectPtr() || !docObj->getDocumentObjectPtr()->getNameInDocument()) {
PyErr_SetString(Base::BaseExceptionFreeCADError, "Cannot remove an invalid object");
PyErr_SetString(Base::PyExc_FC_GeneralError, "Cannot remove an invalid object");
return nullptr;
}
if (docObj->getDocumentObjectPtr()->getDocument() != getFeaturePathCompoundPtr()->getDocument()) {
PyErr_SetString(Base::BaseExceptionFreeCADError, "Cannot remove an object from another document from this group");
PyErr_SetString(Base::PyExc_FC_GeneralError, "Cannot remove an object from another document from this group");
return nullptr;
}