Adding visual return when error
This commit is contained in:
@@ -181,4 +181,13 @@ class WorkflowEngine:
|
||||
Run the workflow and return all results as a list.
|
||||
Use this method when you need all results at once.
|
||||
"""
|
||||
return list(self.run())
|
||||
try:
|
||||
return list(self.run())
|
||||
except DataProcessorError as err:
|
||||
self.has_error = True
|
||||
self.errors[err.component_id] = err.error
|
||||
return []
|
||||
except Exception as err:
|
||||
self.has_error = True
|
||||
self.global_error = str(err)
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user