-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathError Handling Exception codes.py
85 lines (82 loc) · 2.07 KB
/
Error Handling Exception codes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# This is a complete list of exeception handlers:
except Exception:
except BaseException:
except ArithmeticError:
except BufferError:
except LookupError:
except AssertionError:
except AttributeError:
except EOFError:
except FloatingPointError:
except GeneratorExit:
except ImportError:
except ModuleNotFoundError:
except IndexError:
except KeyError:
except KeyboardInterrupt:
except MemoryError:
except NameError:
except NotImplementedError:
except OSError:
except OSError:
except OverflowError:
except RecursionError:
except ReferenceError:
except RuntimeError:
except StopIteration:
except StopAsyncIteration:
except SyntaxError:
except IndentationError:
except TabError:
except SystemError:
except SystemExit:
except TypeError:
except UnboundLocalError:
except UnicodeError:
except UnicodeEncodeError:
except UnicodeDecodeError:
except UnicodeTranslateError:
except ValueError:
except ZeroDivisionError:
except EnvironmentError:
except IOError:
except WindowsError:
except BlockingIOError:
except ChildProcessError:
except ConnectionError:
except BrokenPipeError:
except ConnectionAbortedError:
except ConnectionRefusedError:
except ConnectionResetError:
except FileExistsError:
except FileNotFoundError:
except InterruptedError:
except IsADirectoryError:
except NotADirectoryError:
except PermissionError:
except ProcessLookupError:
except TimeoutError:
except Warning:
except UserWarning:
except DeprecationWarning:
except PendingDeprecationWarning:
except SyntaxWarning:
except RuntimeWarning:
except FutureWarning:
except ImportWarning:
except UnicodeWarning:
except BytesWarning:
except ResourceWarning:
# This is the basic skeletal 'try' and 'except' error handler code blocks,
# which includes the 'finally' statement. Note: the 'finally' statement is
# optional; you do not need to invoke the 'finally' statement. However, it
# can be quite handy when you want to show any output on the screen, no matter
# the outcome of the program's execution/run.
try:
pass
except:
pass
else:
pass
finally:
pass