Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user