Add some extra information when the Cura can't write the files.

This commit is contained in:
Diego Prado Gesto 2018-08-03 12:02:11 +02:00
parent d8abf8f470
commit 38a0c9b66d
4 changed files with 25 additions and 2 deletions

View file

@ -25,6 +25,9 @@ except ImportError:
import zipfile
import UM.Application
from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura")
class ThreeMFWriter(MeshWriter):
def __init__(self):
@ -173,6 +176,7 @@ class ThreeMFWriter(MeshWriter):
archive.writestr(relations_file, b'<?xml version="1.0" encoding="UTF-8"?> \n' + ET.tostring(relations_element))
except Exception as e:
Logger.logException("e", "Error writing zip file")
self.setInformation(catalog.i18nc("@error:zip", "Error writing 3mf file."))
return False
finally:
if not self._store_archive: