Base: do not report C++ exception when converting it to Python exception
See https://forum.freecadweb.org/viewtopic.php?f=23&t=56464
This commit is contained in:
@@ -615,13 +615,11 @@ PyObject * @self.export.Name@::staticCallback_@i.Name@ (PyObject *self, PyObject
|
||||
} // Please sync the following catch implementation with PY_CATCH
|
||||
catch(Base::AbortException &e)
|
||||
{
|
||||
e.ReportException();
|
||||
PyErr_SetObject(Base::BaseExceptionFreeCADAbort,e.getPyObject());
|
||||
return NULL;
|
||||
}
|
||||
catch(Base::Exception &e)
|
||||
{
|
||||
e.ReportException();
|
||||
auto pye = e.getPyExceptionType();
|
||||
if(!pye)
|
||||
pye = Base::BaseExceptionFreeCADError;
|
||||
@@ -790,13 +788,11 @@ PyObject *@self.export.Name@::_getattr(const char *attr) // __getattr__ functi
|
||||
} // Please sync the following catch implementation with PY_CATCH
|
||||
catch(Base::AbortException &e)
|
||||
{
|
||||
e.ReportException();
|
||||
PyErr_SetObject(Base::BaseExceptionFreeCADAbort,e.getPyObject());
|
||||
return NULL;
|
||||
}
|
||||
catch(Base::Exception &e)
|
||||
{
|
||||
e.ReportException();
|
||||
auto pye = e.getPyExceptionType();
|
||||
if(!pye)
|
||||
pye = Base::BaseExceptionFreeCADError;
|
||||
@@ -852,13 +848,11 @@ int @self.export.Name@::_setattr(const char *attr, PyObject *value) // __setattr
|
||||
} // Please sync the following catch implementation with PY_CATCH
|
||||
catch(Base::AbortException &e)
|
||||
{
|
||||
e.ReportException();
|
||||
PyErr_SetObject(Base::BaseExceptionFreeCADAbort,e.getPyObject());
|
||||
return -1;
|
||||
}
|
||||
catch(Base::Exception &e)
|
||||
{
|
||||
e.ReportException();
|
||||
auto pye = e.getPyExceptionType();
|
||||
if(!pye)
|
||||
pye = Base::BaseExceptionFreeCADError;
|
||||
|
||||
Reference in New Issue
Block a user