Skip to content

Instantly share code, notes, and snippets.

@keyurgolani
Created February 12, 2018 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keyurgolani/2db0c408bd18f22f44ad4df86851e856 to your computer and use it in GitHub Desktop.
Save keyurgolani/2db0c408bd18f22f44ad4df86851e856 to your computer and use it in GitHub Desktop.
Print Whole Stack Trace in Python without halting the execution
try:
# Do something
except Exception as e:
import traceback
import sys
exc_info = sys.exc_info()
traceback.print_exception(*exc_info)
del exc_info
# Handle Exception
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment