Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry error message #82

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Retry error message #82

wants to merge 4 commits into from

Conversation

lucastoro
Copy link

@lucastoro lucastoro commented Nov 13, 2018

I propose a small change to improve the meaningfulness of the string representation of a (failed) Attempt.
Now when serializing the Attempt instance (likely when catching a RetryError exception) the returned string contains a customizable message or, when not specified, the name of the function that was wrapped by @retry.
I updated the unit tests as well to verify the correct behavior of the feature and of course checked that other functionalities were not affected.

P.s. I know I should have opened an issue first, but I thought it would be faster to just make a PR.

Luca Castoro and others added 4 commits November 13, 2018 14:49
…sage that can be used to trace back the failing function without inpsecting the back trace.

The message can be specified using the @Retry(custom_message='...') argument, and if omitted will default to the name of the function invoked.
Unit tests updated accordingly.
Added myself to the AUTHORS.rst file 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant