From 1769a697926cb1b5ec6489fcc8e349275b8c4e81 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 12 Apr 2018 16:56:05 +0200 Subject: [PATCH] Don't crash Cura when material file is wrongly formatted That was the whole point of this change. Instead degrade gracefully. It won't load the material file but give an error message saying that the material is corrupt. Then it won't be able to load the stack as well because the material doesn't exist, and give an error about the stack as well. Contributes to issue CURA-5045. --- plugins/3MFReader/ThreeMFWorkspaceReader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/3MFReader/ThreeMFWorkspaceReader.py b/plugins/3MFReader/ThreeMFWorkspaceReader.py index 73db48f1a2..9b27220cfd 100755 --- a/plugins/3MFReader/ThreeMFWorkspaceReader.py +++ b/plugins/3MFReader/ThreeMFWorkspaceReader.py @@ -698,7 +698,7 @@ class ThreeMFWorkspaceReader(WorkspaceReader): except ContainerFormatError: Logger.logException("e", "Failed to deserialize material file %s in project file %s", material_container_file, file_name) - raise + continue if need_new_name: new_name = ContainerRegistry.getInstance().uniqueName(material_container.getName()) material_container.setName(new_name)