+ in setPyObject() only use classes derived from Base::Exception
This commit is contained in:
@@ -123,7 +123,7 @@ void PropertyGeometryList::setPyObject(PyObject *value)
|
||||
if (!PyObject_TypeCheck(item, &(GeometryPy::Type))) {
|
||||
std::string error = std::string("types in list must be 'Geometry', not ");
|
||||
error += item->ob_type->tp_name;
|
||||
throw Py::TypeError(error);
|
||||
throw Base::TypeError(error);
|
||||
}
|
||||
|
||||
values[i] = static_cast<GeometryPy*>(item)->getGeometryPtr();
|
||||
@@ -138,7 +138,7 @@ void PropertyGeometryList::setPyObject(PyObject *value)
|
||||
else {
|
||||
std::string error = std::string("type must be 'Geometry' or list of 'Geometry', not ");
|
||||
error += value->ob_type->tp_name;
|
||||
throw Py::TypeError(error);
|
||||
throw Base::TypeError(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user