blob: b588c6b3bb6c1582ea69e438fe6069db308b0439 (
plain) (
blame)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
|
try:
raise ArithmeticError
except Exception:
print("Caught ArithmeticError via Exception")
try:
raise ArithmeticError
except ArithmeticError:
print("Caught ArithmeticError")
try:
raise AssertionError
except Exception:
print("Caught AssertionError via Exception")
try:
raise AssertionError
except AssertionError:
print("Caught AssertionError")
try:
raise AttributeError
except Exception:
print("Caught AttributeError via Exception")
try:
raise AttributeError
except AttributeError:
print("Caught AttributeError")
#try:
# raise BufferError
#except Exception:
# print("Caught BufferError via Exception")
#try:
# raise BufferError
#except BufferError:
# print("Caught BufferError")
#try:
# raise BytesWarning
#except Warning:
# print("Caught BytesWarning via Warning")
#try:
# raise BytesWarning
#except BytesWarning:
# print("Caught BytesWarning")
#try:
# raise DeprecationWarning
#except Warning:
# print("Caught DeprecationWarning via Warning")
#try:
# raise DeprecationWarning
#except DeprecationWarning:
# print("Caught DeprecationWarning")
try:
raise EOFError
except Exception:
print("Caught EOFError via Exception")
try:
raise EOFError
except EOFError:
print("Caught EOFError")
#try:
# raise EnvironmentError
#except Exception:
# print("Caught EnvironmentError via Exception")
#try:
# raise EnvironmentError
#except EnvironmentError:
# print("Caught EnvironmentError")
try:
raise Exception
except BaseException:
print("Caught Exception via BaseException")
try:
raise Exception
except Exception:
print("Caught Exception")
#try:
# raise FloatingPointError
#except ArithmeticError:
# print("Caught FloatingPointError via ArithmeticError")
#try:
# raise FloatingPointError
#except FloatingPointError:
# print("Caught FloatingPointError")
#try:
# raise FutureWarning
#except Warning:
# print("Caught FutureWarning via Warning")
#try:
# raise FutureWarning
#except FutureWarning:
# print("Caught FutureWarning")
#try:
# raise IOError
#except Exception:
# print("Caught IOError via Exception")
#try:
# raise IOError
#except IOError:
# print("Caught IOError")
try:
raise ImportError
except Exception:
print("Caught ImportError via Exception")
try:
raise ImportError
except ImportError:
print("Caught ImportError")
#try:
# raise ImportWarning
#except Warning:
# print("Caught ImportWarning via Warning")
#try:
# raise ImportWarning
#except ImportWarning:
# print("Caught ImportWarning")
try:
raise IndentationError
except SyntaxError:
print("Caught IndentationError via SyntaxError")
try:
raise IndentationError
except IndentationError:
print("Caught IndentationError")
try:
raise IndexError
except LookupError:
print("Caught IndexError via LookupError")
try:
raise IndexError
except IndexError:
print("Caught IndexError")
try:
raise KeyError
except LookupError:
print("Caught KeyError via LookupError")
try:
raise KeyError
except KeyError:
print("Caught KeyError")
try:
raise LookupError
except Exception:
print("Caught LookupError via Exception")
try:
raise LookupError
except LookupError:
print("Caught LookupError")
try:
raise MemoryError
except Exception:
print("Caught MemoryError via Exception")
try:
raise MemoryError
except MemoryError:
print("Caught MemoryError")
try:
raise NameError
except Exception:
print("Caught NameError via Exception")
try:
raise NameError
except NameError:
print("Caught NameError")
try:
raise NotImplementedError
except RuntimeError:
print("Caught NotImplementedError via RuntimeError")
try:
raise NotImplementedError
except NotImplementedError:
print("Caught NotImplementedError")
try:
raise OSError
except Exception:
print("Caught OSError via Exception")
try:
raise OSError
except OSError:
print("Caught OSError")
try:
raise OverflowError
except ArithmeticError:
print("Caught OverflowError via ArithmeticError")
try:
raise OverflowError
except OverflowError:
print("Caught OverflowError")
#try:
# raise PendingDeprecationWarning
#except Warning:
# print("Caught PendingDeprecationWarning via Warning")
#try:
# raise PendingDeprecationWarning
#except PendingDeprecationWarning:
# print("Caught PendingDeprecationWarning")
#try:
# raise ReferenceError
#except Exception:
# print("Caught ReferenceError via Exception")
#try:
# raise ReferenceError
#except ReferenceError:
# print("Caught ReferenceError")
#try:
# raise ResourceWarning
#except Warning:
# print("Caught ResourceWarning via Warning")
#try:
# raise ResourceWarning
#except ResourceWarning:
# print("Caught ResourceWarning")
try:
raise RuntimeError
except Exception:
print("Caught RuntimeError via Exception")
try:
raise RuntimeError
except RuntimeError:
print("Caught RuntimeError")
#try:
# raise RuntimeWarning
#except Warning:
# print("Caught RuntimeWarning via Warning")
#try:
# raise RuntimeWarning
#except RuntimeWarning:
# print("Caught RuntimeWarning")
try:
raise SyntaxError
except Exception:
print("Caught SyntaxError via Exception")
try:
raise SyntaxError
except SyntaxError:
print("Caught SyntaxError")
#try:
# raise SyntaxWarning
#except Warning:
# print("Caught SyntaxWarning via Warning")
#try:
# raise SyntaxWarning
#except SyntaxWarning:
# print("Caught SyntaxWarning")
#try:
# raise SystemError
#except Exception:
# print("Caught SystemError via Exception")
#try:
# raise SystemError
#except SystemError:
# print("Caught SystemError")
#try:
# raise TabError
#except IndentationError:
# print("Caught TabError via IndentationError")
#try:
# raise TabError
#except TabError:
# print("Caught TabError")
try:
raise TypeError
except Exception:
print("Caught TypeError via Exception")
try:
raise TypeError
except TypeError:
print("Caught TypeError")
#try:
# raise UnboundLocalError
#except NameError:
# print("Caught UnboundLocalError via NameError")
#try:
# raise UnboundLocalError
#except UnboundLocalError:
# print("Caught UnboundLocalError")
#try:
# raise UserWarning
#except Warning:
# print("Caught UserWarning via Warning")
#try:
# raise UserWarning
#except UserWarning:
# print("Caught UserWarning")
try:
raise ValueError
except Exception:
print("Caught ValueError via Exception")
try:
raise ValueError
except ValueError:
print("Caught ValueError")
#try:
# raise Warning
#except Exception:
# print("Caught Warning via Exception")
#try:
# raise Warning
#except Warning:
# print("Caught Warning")
try:
raise ZeroDivisionError
except ArithmeticError:
print("Caught ZeroDivisionError via ArithmeticError")
try:
raise ZeroDivisionError
except ZeroDivisionError:
print("Caught ZeroDivisionError")
|