Tor Norbye | 3a2425a5 | 2013-11-04 10:16:08 -0800 | [diff] [blame] | 1 | class F(Exception): |
2 | def foo(self): | ||||
3 | raise self | ||||
4 | |||||
5 | try: | ||||
6 | F().foo() | ||||
7 | except BaseException: | ||||
8 | print("BaseException") | ||||
9 | except <warning descr="'BaseException', superclass of exception class 'Exception', has already been caught">Exception</warning>: | ||||
10 | print("Exception") | ||||
11 | |||||
12 | try: | ||||
13 | pass | ||||
14 | except Exception as e: | ||||
15 | pass | ||||
16 | except <warning descr="Exception class 'Exception' has already been caught">Exception</warning> as ex: | ||||
17 | pass |