mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 21:19:01 +08:00
Added exception handling to XML parsing
CURA-3843
This commit is contained in:
parent
75b3f08318
commit
4b826b747b
@ -425,7 +425,12 @@ class XmlMaterialProfile(InstanceContainer):
|
||||
# update the serialized data first
|
||||
from UM.Settings.Interfaces import ContainerInterface
|
||||
serialized = ContainerInterface.deserialize(self, serialized)
|
||||
data = ET.fromstring(serialized)
|
||||
|
||||
try:
|
||||
data = ET.fromstring(serialized)
|
||||
except:
|
||||
Logger.logException("e", "An exception occured while parsing the material profile")
|
||||
return
|
||||
|
||||
# Reset previous metadata
|
||||
self.clearData() # Ensure any previous data is gone.
|
||||
|
Loading…
x
Reference in New Issue
Block a user