Skip to content

Instantly share code, notes, and snippets.

@jorenham jorenham/
Last active Jan 18, 2018

What would you like to do?
Best exception handling in Python
import webbrowser
def main():
return 42/0
if __name__== '__main__':
except Exception as e:
webbrowser.open_new_tab('[python] {}'.format(e))
raise e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.