Bad.__repr__()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
dl 0
loc 2
rs 10
1
class Bad(Exception):
2
    def __repr__(self):
3
        raise RuntimeError("I'm a bad class!")
4
5
6
def a():
7
    x = Bad()
8
    return x
9
10
def b():
11
    x = Bad()
12
    raise x
13
14
a()
15
try:
16
    b()
17
except Exception as exc:
18
    print(exc)
19