Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError

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

View File

@@ -76,7 +76,7 @@
str += e.what(); \
str += ")"; \
e.ReportException(); \
PyErr_SetString(Base::BaseExceptionFreeCADError,str.c_str());\
PyErr_SetString(Base::PyExc_FC_GeneralError,str.c_str());\
} \
catch(std::exception &e) \
{ \
@@ -85,11 +85,11 @@
str += e.what(); \
str += ")"; \
Base::Console().Error(str.c_str()); \
PyErr_SetString(Base::BaseExceptionFreeCADError,str.c_str());\
PyErr_SetString(Base::PyExc_FC_GeneralError,str.c_str());\
} \
catch(const char *e) \
{ \
PyErr_SetString(Base::BaseExceptionFreeCADError,e); \
PyErr_SetString(Base::PyExc_FC_GeneralError,e); \
} throw Py::Exception();
namespace Path {

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