Skip to content

Commit

Permalink
Merge pull request #187 from kyaukyuai/fix/project
Browse files Browse the repository at this point in the history
Refactor exception handling for step execution
  • Loading branch information
kyaukyuai authored Mar 19, 2024
2 parents 4a4a0da + 7bb1ad5 commit 65bfb7a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gpt_all_star/core/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,14 @@ def _execute_step(self, step) -> None:
success = True
else:
self.copilot.state(
self._("Retrying step %d (Attempt %d/%d)")
% (step, retries + 1, MAX_RETRIES)
self._("Retrying step: %s (Attempt %d/%d)")
% (step.__name__, retries + 1, MAX_RETRIES)
)
retries += 1
except Exception as e:
self.copilot.state(
self._("Failed to execute step %d. Reason: %s") % (step, str(e))
self._("Failed to execute step: %s. Reason: %s")
% (step.__name__, str(e))
)
raise e

Expand Down

0 comments on commit 65bfb7a

Please sign in to comment.