Skip to content

Instantly share code, notes, and snippets.

@hsteinshiromoto
Created July 13, 2021 11:48
Show Gist options
  • Save hsteinshiromoto/51d9291c8b4b6bc7e791dbb41e28e5f1 to your computer and use it in GitHub Desktop.
Save hsteinshiromoto/51d9291c8b4b6bc7e791dbb41e28e5f1 to your computer and use it in GitHub Desktop.
Print exception
try:
import module
except ModuleNotFoundError:
exc_info = sys.exc_info()
traceback.print_exception(*exc_info)
del exc_info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment