Created
October 7, 2014 05:44
-
-
Save alexland/0cd358e114c93d3617db to your computer and use it in GitHub Desktop.
your code throws an exception, but you can't write a handler because you don't know the module in which the exception class is defined
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 as xe: | |
print("caught exception defined in module {}".format(xe.__class__.__module__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment