1BaseException
2 ] SystemExit
3 ] KeyboardInterrupt
4 ] GeneratorExit
5 ] Exception
6 ] StopIteration
7 ] StopAsyncIteration
8 ] ArithmeticError
9 | ] FloatingPointError
10 | ] OverflowError
11 | ] ZeroDivisionError
12 ] AssertionError
13 ] AttributeError
14 ] BufferError
15 ] EOFError
16 ] ImportError
17 | ] ModuleNotFoundError
18 ] LookupError
19 | ] IndexError
20 | ] KeyError
21 ] MemoryError
22 ] NameError
23 | ] UnboundLocalError
24 ] OSError
25 | ] BlockingIOError
26 | ] ChildProcessError
27 | ] ConnectionError
28 | | ] BrokenPipeError
29 | | ] ConnectionAbortedError
30 | | ] ConnectionRefusedError
31 | | ] ConnectionResetError
32 | ] FileExistsError
33 | ] FileNotFoundError
34 | ] InterruptedError
35 | ] IsADirectoryError
36 | ] NotADirectoryError
37 | ] PermissionError
38 | ] ProcessLookupError
39 | ] TimeoutError
40 ] ReferenceError
41 ] RuntimeError
42 | ] NotImplementedError
43 | ] RecursionError
44 ] SyntaxError
45 | ] IndentationError
46 | ] TabError
47 ] SystemError
48 ] TypeError
49 ] ValueError
50 | ] UnicodeError
51 | ] UnicodeDecodeError
52 | ] UnicodeEncodeError
53 | ] UnicodeTranslateError
54 ] Warning
55 ] DeprecationWarning
56 ] PendingDeprecationWarning
57 ] RuntimeWarning
58 ] SyntaxWarning
59 ] UserWarning
60 ] FutureWarning
61 ] ImportWarning
62 ] UnicodeWarning
63 ] BytesWarning
64 ] ResourceWarning
1try:
2 ...
3except SomeException:
4 tb = sys.exc_info()[2]
5 raise OtherException(...).with_traceback(tb)
6