From 07d64f2335841a7b571b051de4940a06e88a488b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 10 Apr 2017 11:18:02 +0200 Subject: [PATCH] Report the type that was found when replacing containers Makes it easier to debug. Contributes to issue CURA-3497. --- cura/Settings/CuraContainerStack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/CuraContainerStack.py b/cura/Settings/CuraContainerStack.py index 6b4ce16ee2..70459aa73a 100644 --- a/cura/Settings/CuraContainerStack.py +++ b/cura/Settings/CuraContainerStack.py @@ -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)