mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-24 06:39:38 +08:00
Report the type that was found when replacing containers
Makes it easier to debug. Contributes to issue CURA-3497.
This commit is contained in:
parent
d74aa4d24e
commit
07d64f2335
@ -167,7 +167,7 @@ class CuraContainerStack(ContainerStack):
|
||||
if not isinstance(container, DefinitionContainer):
|
||||
raise Exceptions.InvalidContainerError("Cannot replace container at index {index} with a container that is not a DefinitionContainer".format(index = index))
|
||||
elif container != self._empty_instance_container and container.getMetaDataEntry("type") != expected_type:
|
||||
raise Exceptions.InvalidContainerError("Cannot replace container at index {index} with a container that is not of {type} type".format(index = index, type = expected_type))
|
||||
raise Exceptions.InvalidContainerError("Cannot replace container at index {index} with a container that is not of {type} type, but {actual_type} type.".format(index = index, type = expected_type, actual_type = container.getMetaDataEntry("type")))
|
||||
|
||||
super().replaceContainer(index, container, postpone_emit)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user