Error Handling
Exceptions
Raising them
raise Exception("Some exception")
raise TypeError("Only integers")Catching them
try:
...
except Exception as e:
print(repr(e))
except:
...
else:
...
finally:
...Last updated