blob: 27f19afc693939cf272db39c1ab8491532b71b8a (
plain)
1
2
3
4
5
6
7
8
|
# The try except might be removed entirely:
1 / 0
# Or another more detailed exception can be raised:
try:
1 / 0
except ZeroDivisionError as e:
raise ValueError("The area of the rectangle cannot be zero") from e
|