Give an error message when stack fails to build

This way we may venture at a reason why it failed to build.
This commit is contained in:
Ghostkeeper 2020-08-10 11:25:46 +02:00
parent fc6ea28352
commit e7d95f6d90
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -62,7 +62,8 @@ class CuraStackBuilder:
for position in extruder_dict:
try:
cls.createExtruderStackWithDefaultSetup(new_global_stack, position)
except IndexError:
except IndexError as e:
Logger.logException("e", "Failed to create an extruder stack for position {pos}: {err}".format(pos = position, err = str(e)))
return None
for new_extruder in new_global_stack.extruderList: # Only register the extruders if we're sure that all of them are correct.