summaryrefslogtreecommitdiff
path: root/misc/exceptions.py
blob: e59194f150b506686f630cdf424660bff0bca7f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
#exceptions

def spam(divided_by):
    try:
        return 42 / divided_by
    except:
        print('Invalid argument.')

print(spam(2))
print(spam(0))
print(spam(1))