mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:39:03 +08:00
Added handling for if definition for error handling was not found
CURA-3772
This commit is contained in:
parent
bd276a4d70
commit
63eceda75e
@ -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…
x
Reference in New Issue
Block a user