Created
December 3, 2013 23:31
-
-
Save mbylstra/7779646 to your computer and use it in GitHub Desktop.
print full stack trace of Exception
from https://djangosnippets.org/snippets/1654/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import traceback | |
try: | |
#some code | |
except Exception, e: | |
print ''.join(traceback.format_exception(*sys.exc_info())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment