Closed hl2055 closed 7 years ago
What is the purpose of having the __call__
method in this?
So we can use the value kwarg in init() to customize the error message, like: @timeout(seconds=5, timeout_exception=TimeoutError(value='Time out executing foo()')) def foo(): time.sleep(6)
On Aug 14, 2017 1:06 PM, "Patrick" notifications@github.com wrote:
What is the purpose of having the call method in this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pnpnpn/timeout-decorator/pull/38#issuecomment-322248640, or mute the thread https://github.com/notifications/unsubscribe-auth/AFutcfdb9AfxrwoaxN4xuTdHIlz-4xVsks5sYH6igaJpZM4OygPu .
Oh, I was just being silly and just realized the kwarg "exception_message".
In order to easily customize error message.