From a5f982300eed5a4d9d1553b83af53796d0a5c440 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Mon, 7 Nov 2022 17:55:40 -0800 Subject: [PATCH] Add example of traceback.format_exception. --- voussoirkit/threadpool.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/voussoirkit/threadpool.py b/voussoirkit/threadpool.py index 6a47539..0294732 100644 --- a/voussoirkit/threadpool.py +++ b/voussoirkit/threadpool.py @@ -17,6 +17,9 @@ Here are some examples of threadpool in use: >>> if job.value is not None: >>> yield job.value +Also consider: +log.error(''.join(traceback.format_exception(None, job.exception, job.exception.__traceback__))) + 2. Git-fetching a bunch of repositories with no error handling: >>> def git_fetch(d):