-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathError Handling and Raise Exceptions.py
More file actions
89 lines (87 loc) · 1.95 KB
/
Error Handling and Raise Exceptions.py
File metadata and controls
89 lines (87 loc) · 1.95 KB
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
86
87
88
89
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([arg]):
except OSError(errno, strerror[, filename[, winerror[, filename2]]]):
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:
try:
pass
except Exception:
pass
else:
pass
finally:
pass
try:
f=open('Car_game.py')
except FileNotFoundError as e:
print(e)
except Exception as e:
print(e)
else:
print(f.read())
f.close()
finally:
print('Executing Finally...')