Skip to content

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