Skip to content

Instantly share code, notes, and snippets.

@alexland
Created September 26, 2013 03:38
Show Gist options
  • Save alexland/6709599 to your computer and use it in GitHub Desktop.
Save alexland/6709599 to your computer and use it in GitHub Desktop.
how to find the module an exception class was defined in
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