App: do not hide actual exception type in DocumentObjectPy::addProperty/DocumentObjectPy::removeProperty
and throw TypeError in DynamicProperty::addDynamicProperty() if the based type id is invalid
This commit is contained in:
@@ -183,7 +183,7 @@ Property* DynamicProperty::addDynamicProperty(PropertyContainer &pc, const char*
|
||||
|
||||
Base::Type propType = Base::Type::getTypeIfDerivedFrom(type, App::Property::getClassTypeId(), true);
|
||||
if (propType.isBad()) {
|
||||
FC_THROWM(Base::ValueError, "Invalid type "
|
||||
FC_THROWM(Base::TypeError, "Invalid type "
|
||||
<< type << " for property " << pc.getFullName() << '.' << name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user