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:
@@ -205,7 +205,7 @@ class DocumentBasicCases(unittest.TestCase):
|
||||
self.assertEqual(ext.createInstance(), None)
|
||||
|
||||
obj = self.Doc.addObject("App::FeaturePython", "Object")
|
||||
with self.assertRaises(RuntimeError):
|
||||
with self.assertRaises(TypeError):
|
||||
obj.addProperty("App::DocumentObjectExtension", "Property")
|
||||
|
||||
with self.assertRaises(TypeError):
|
||||
|
||||
Reference in New Issue
Block a user