Created
September 26, 2013 03:38
-
-
Save alexland/6709599 to your computer and use it in GitHub Desktop.
how to find the module an exception class was defined in
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
try: | |
... | |
except Exception, e: | |
print("caught an exception defined in class {0}".format(e.__class__.__module__)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment