Skip to content

Instantly share code, notes, and snippets.

@bergpb
Last active May 20, 2020 13:57
Show Gist options
  • Select an option

  • Save bergpb/e0455d30c6f82c47189355cb79518220 to your computer and use it in GitHub Desktop.

Select an option

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