mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Added handling for if definition for error handling was not found
CURA-3772
This commit is contained in:
parent
bd276a4d70
commit
63eceda75e
1 changed files with 5 additions and 1 deletions
|
@ -275,7 +275,11 @@ class CuraEngineBackend(QObject, Backend):
|
|||
error_labels = set()
|
||||
definition_container = self._global_container_stack.getBottom()
|
||||
for key in error_keys:
|
||||
error_labels.add(definition_container.findDefinitions(key = key)[0].label)
|
||||
definitions = definition_container.findDefinitions(key = key)
|
||||
if definitions:
|
||||
error_labels.add(definitions[0].label)
|
||||
else:
|
||||
Logger.log("w", "Unable to find definition for key: {key}".format(key = key))
|
||||
|
||||
error_labels = ", ".join(error_labels)
|
||||
self._error_message = Message(catalog.i18nc("@info:status", "Unable to slice with the current settings. The following settings have errors: {0}".format(error_labels)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue