Python-100-Days/Day01-15/code/Day11/ex4.py

23 lines
181 B
Python
Raw Normal View History

2018-04-27 00:00:22 +08:00
"""
引发异常和异常栈
Version: 0.1
Author: 骆昊
Date: 2018-03-13
"""
def f1():
2019-05-03 21:17:36 +08:00
raise AssertionError('发生异常')
2018-04-27 00:00:22 +08:00
def f2():
2019-05-03 21:17:36 +08:00
f1()
2018-04-27 00:00:22 +08:00
def f3():
2019-05-03 21:17:36 +08:00
f2()
2018-04-27 00:00:22 +08:00
f3()