Last active
May 20, 2020 13:57
-
-
Save bergpb/e0455d30c6f82c47189355cb79518220 to your computer and use it in GitHub Desktop.
Catching exceptions in python
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
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