Fix GCC warnings: catching polymorphic type by value [-Wcatch-value=]
This commit is contained in:
committed by
abdullahtahiriyo
parent
c89e6eec13
commit
90c4ffceec
@@ -259,7 +259,7 @@ PyObject* GeometryPy::getExtensionOfType(PyObject *args)
|
||||
PyErr_SetString(PartExceptionOCCError, "Geometry extension does not exist anymore.");
|
||||
return 0;
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not implement a Python counterpart.");
|
||||
return 0;
|
||||
}
|
||||
@@ -296,7 +296,7 @@ PyObject* GeometryPy::getExtensionOfName(PyObject *args)
|
||||
PyErr_SetString(PartExceptionOCCError, "Geometry extension does not exist anymore.");
|
||||
return 0;
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not implement a Python counterpart.");
|
||||
return 0;
|
||||
}
|
||||
@@ -425,7 +425,7 @@ PyObject* GeometryPy::getExtensions(PyObject *args)
|
||||
try {
|
||||
list.append(Py::asObject(p->copyPyObject()));
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
// silently ignoring extensions not having a Python object
|
||||
}
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ PyObject* ExternalGeometryFacadePy::getExtensionOfType(PyObject *args)
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not exist anymore.");
|
||||
return 0;
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not implement a Python counterpart.");
|
||||
return 0;
|
||||
}
|
||||
@@ -353,7 +353,7 @@ PyObject* ExternalGeometryFacadePy::getExtensionOfName(PyObject *args)
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not exist anymore.");
|
||||
return 0;
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not implement a Python counterpart.");
|
||||
return 0;
|
||||
}
|
||||
@@ -480,7 +480,7 @@ PyObject* ExternalGeometryFacadePy::getExtensions(PyObject *args)
|
||||
try {
|
||||
list.append(Py::asObject(p->copyPyObject()));
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
// silently ignoring extensions not having a Python object
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ PyObject* GeometryFacadePy::getExtensionOfType(PyObject *args)
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not exist anymore.");
|
||||
return 0;
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not implement a Python counterpart.");
|
||||
return 0;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ PyObject* GeometryFacadePy::getExtensionOfName(PyObject *args)
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not exist anymore.");
|
||||
return 0;
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
PyErr_SetString(Part::PartExceptionOCCError, "Geometry extension does not implement a Python counterpart.");
|
||||
return 0;
|
||||
}
|
||||
@@ -458,7 +458,7 @@ PyObject* GeometryFacadePy::getExtensions(PyObject *args)
|
||||
try {
|
||||
list.append(Py::asObject(p->copyPyObject()));
|
||||
}
|
||||
catch(Base::NotImplementedError) {
|
||||
catch(Base::NotImplementedError&) {
|
||||
// silently ignoring extensions not having a Python object
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user