41 """Merge newComp with oldComp and provide diagnostics on failure."""
45 assert oldComp.__cpp_type__ == newComp.__cpp_type__,
"Deduplicating components of different type"
46 assert oldComp.name == newComp.name,
"Deduplicating components of different name"
47 oldComp.merge(newComp)
48 except Exception
as e:
51 raiseWithCurrentContext(exception)