Reestablished working state
This commit is contained in:
@@ -7,13 +7,22 @@ def manageFailure(error, action, outputs):
|
||||
errors = action.recoverPolicy
|
||||
error_type = type(error)
|
||||
|
||||
print(f"{type(error).__name__} detected during {action.name}. Applying recovery policy.")
|
||||
#print(f"{type(error).__name__} detected during {action.name}. Applying recovery policy.")
|
||||
|
||||
if error_type in errors:
|
||||
repairs = errors[error_type]
|
||||
|
||||
|
||||
for repair in repairs:
|
||||
outputs, response = buildAction(repair, outputs)
|
||||
if repair == False:
|
||||
return False
|
||||
|
||||
return outputs
|
||||
elif repair is None:
|
||||
return
|
||||
|
||||
else:
|
||||
print(f"{type(error).__name__} detected during {action.name}. Applying recovery policy.")
|
||||
|
||||
outputs, response = buildAction(repair, outputs)
|
||||
|
||||
return outputs
|
||||
print(f"{error}")
|
||||
|
||||
Reference in New Issue
Block a user