Created
March 12, 2009 00:08
-
-
Save hdon/77829 to your computer and use it in GitHub Desktop.
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
In [6]: try: raise Exception('docuhe') | |
...: except Exception: | |
...: print sys.exc_info() | |
...: | |
(<class exceptions.Exception at 0xb7d4629c>, <exceptions.Exception instance at 0xb79a1aac>, <traceback object at 0xb77acbe4>) | |
In [8]: try: raise Exception('docuhe') | |
...: except Exception: | |
...: print sys.exc_info()[2].tb_frame | |
...: | |
<frame object at 0x819edcc> | |
In [10]: try: raise Exception('docuhe') | |
....: except Exception: | |
....: print traceback.format_tb(sys.exc_info()[2]) | |
....: | |
....: | |
[' File "<ipython console>", line 1, in ?\n'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment