Created
March 13, 2012 21:14
-
-
Save starenka/2031659 to your computer and use it in GitHub Desktop.
replacing exception hook to catch all excpetion w/ messing the code
This file contains hidden or 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
| #!/usr/bin/env python | |
| import sys | |
| def catch_all(exc_type, exc_value, traceback): | |
| sys.stderr.write('[!] %s\n'%exc_value) | |
| sys.excepthook = catch_all | |
| if __name__ == '__main__': | |
| raise RuntimeError('CAN I HAZ COOKIE?') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment