additional timeout info (#83364)

pull/83381/head
Brian Coca 4 months ago committed by GitHub
parent c77ed376c4
commit 0a311f6669
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -43,7 +43,15 @@ __all__ = ['TaskExecutor']
class TaskTimeoutError(BaseException):
def __init__(self, message="", frame=None):
self.frame = str(frame)
if frame is not None:
orig = frame
root = pathlib.Path(__file__).parent
while not pathlib.Path(frame.f_code.co_filename).is_relative_to(root):
frame = frame.f_back
self.frame = 'Interrupted at %s called from %s' % (orig, frame)
super(TaskTimeoutError, self).__init__(message)

Loading…
Cancel
Save