Add example of traceback.format_exception.

This commit is contained in:
voussoir 2022-11-07 17:55:40 -08:00
parent 628f18e0db
commit a5f982300e
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -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):