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