blob: a0ca8a74e225ee9798ccb805d28e85e31c871922 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# test basic properties of exceptions
print(repr(IndexError()))
print(str(IndexError()))
print(str(IndexError("foo")))
a = IndexError(1, "test", [100, 200])
print(repr(a))
print(str(a))
print(a.args)
s = StopIteration()
print(s.value)
s = StopIteration(1, 2, 3)
print(s.value)
print(OSError().errno)
print(OSError(1, "msg").errno)
|