Add more info in exceptions

This commit is contained in:
Lipu Fei 2019-07-31 10:34:38 +02:00
parent 8179e1ee90
commit c841382bbd
3 changed files with 18 additions and 4 deletions

View file

@ -129,8 +129,9 @@ class CuraStackBuilder:
extruder_definition = registry.findDefinitionContainers(id = extruder_definition_id)[0]
except IndexError as e:
# It still needs to break, but we want to know what extruder ID made it break.
Logger.log("e", "Unable to find extruder with the id %s", extruder_definition_id)
raise e
msg = "Unable to find extruder definition with the id [%s]" % extruder_definition_id
Logger.logException("e", msg)
raise IndexError(msg)
# get material container for extruders
material_container = application.empty_material_container