Skip to content

Instantly share code, notes, and snippets.

@bergpb
Last active May 20, 2020 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bergpb/e0455d30c6f82c47189355cb79518220 to your computer and use it in GitHub Desktop.
Save bergpb/e0455d30c6f82c47189355cb79518220 to your computer and use it in GitHub Desktop.
Catching exceptions in python
a = 1
b = 'a'
try:
a / b
except Exception as e:
print(f"Exception of type {type(e)} as ocurred: {e}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment