Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError
This commit is contained in:
@@ -572,13 +572,13 @@ PyObject * @self.export.Name@::staticCallback_@i.Name@ (PyObject *self, PyObject
|
||||
{
|
||||
auto pye = e.getPyExceptionType();
|
||||
if(!pye)
|
||||
pye = Base::BaseExceptionFreeCADError;
|
||||
PyErr_SetObject(pye,e.getPyObject());
|
||||
pye = Base::PyExc_FC_GeneralError;
|
||||
PyErr_SetObject(pye, e.getPyObject());
|
||||
return nullptr;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError,e.what());
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError, e.what());
|
||||
return nullptr;
|
||||
}
|
||||
catch(const Py::Exception&)
|
||||
@@ -589,7 +589,7 @@ PyObject * @self.export.Name@::staticCallback_@i.Name@ (PyObject *self, PyObject
|
||||
#ifndef DONT_CATCH_CXX_EXCEPTIONS
|
||||
catch(...)
|
||||
{
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError,"Unknown C++ exception");
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError, "Unknown C++ exception");
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
@@ -613,7 +613,7 @@ PyObject * @self.export.Name@::staticCallback_get@i.Name@ (PyObject *self, void
|
||||
// The exception text is already set
|
||||
return nullptr;
|
||||
} catch (...) {
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError, "Unknown exception while reading attribute '@i.Name@' of object '@self.export.Twin@'");
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError, "Unknown exception while reading attribute '@i.Name@' of object '@self.export.Twin@'");
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
@@ -652,7 +652,7 @@ int @self.export.Name@::staticCallback_set@i.Name@ (PyObject *self, PyObject *va
|
||||
// The exception text is already set
|
||||
return -1;
|
||||
} catch (...) {
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError, "Unknown exception while writing attribute '@i.Name@' of object '@self.export.Twin@'");
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError, "Unknown exception while writing attribute '@i.Name@' of object '@self.export.Twin@'");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@@ -735,13 +735,13 @@ PyObject *@self.export.Name@::_getattr(const char *attr) // __getattr__ functi
|
||||
{
|
||||
auto pye = e.getPyExceptionType();
|
||||
if(!pye)
|
||||
pye = Base::BaseExceptionFreeCADError;
|
||||
PyErr_SetObject(pye,e.getPyObject());
|
||||
pye = Base::PyExc_FC_GeneralError;
|
||||
PyErr_SetObject(pye, e.getPyObject());
|
||||
return nullptr;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError,e.what());
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError, e.what());
|
||||
return nullptr;
|
||||
}
|
||||
catch(const Py::Exception&)
|
||||
@@ -752,7 +752,7 @@ PyObject *@self.export.Name@::_getattr(const char *attr) // __getattr__ functi
|
||||
#ifndef DONT_CATCH_CXX_EXCEPTIONS
|
||||
catch(...)
|
||||
{
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError,"Unknown C++ exception");
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError,"Unknown C++ exception");
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
@@ -785,13 +785,13 @@ int @self.export.Name@::_setattr(const char *attr, PyObject *value) // __setattr
|
||||
{
|
||||
auto pye = e.getPyExceptionType();
|
||||
if(!pye)
|
||||
pye = Base::BaseExceptionFreeCADError;
|
||||
PyErr_SetObject(pye,e.getPyObject());
|
||||
pye = Base::PyExc_FC_GeneralError;
|
||||
PyErr_SetObject(pye, e.getPyObject());
|
||||
return -1;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError,e.what());
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError, e.what());
|
||||
return -1;
|
||||
}
|
||||
catch(const Py::Exception&)
|
||||
@@ -802,7 +802,7 @@ int @self.export.Name@::_setattr(const char *attr, PyObject *value) // __setattr
|
||||
#ifndef DONT_CATCH_CXX_EXCEPTIONS
|
||||
catch(...)
|
||||
{
|
||||
PyErr_SetString(Base::BaseExceptionFreeCADError,"Unknown C++ exception");
|
||||
PyErr_SetString(Base::PyExc_FC_GeneralError, "Unknown C++ exception");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user