mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Added exception handling to XML parsing
CURA-3843
This commit is contained in:
parent
75b3f08318
commit
4b826b747b
1 changed files with 6 additions and 1 deletions
|
@ -425,7 +425,12 @@ class XmlMaterialProfile(InstanceContainer):
|
||||||
# update the serialized data first
|
# update the serialized data first
|
||||||
from UM.Settings.Interfaces import ContainerInterface
|
from UM.Settings.Interfaces import ContainerInterface
|
||||||
serialized = ContainerInterface.deserialize(self, serialized)
|
serialized = ContainerInterface.deserialize(self, serialized)
|
||||||
|
|
||||||
|
try:
|
||||||
data = ET.fromstring(serialized)
|
data = ET.fromstring(serialized)
|
||||||
|
except:
|
||||||
|
Logger.logException("e", "An exception occured while parsing the material profile")
|
||||||
|
return
|
||||||
|
|
||||||
# Reset previous metadata
|
# Reset previous metadata
|
||||||
self.clearData() # Ensure any previous data is gone.
|
self.clearData() # Ensure any previous data is gone.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue