Created
February 11, 2016 12:30
-
-
Save saxbophone/4b58114f44f03c1b1e1f to your computer and use it in GitHub Desktop.
The one exception handler
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
import urllib | |
import webbrowser | |
try: | |
thing() | |
except Exception as E: | |
webbrowser.open( | |
'http://stackoverflow.com/search?q={}'.format( | |
urllib.quote_plus('{} {}'.format(E.__class__.__name__, E.message)) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment