python: try except --- During handling of the above exception, another exception occurred
第一部分引用自“https://www.pynote.net/archives/1856”,作为引入,可参看原文
在以下代码中,执行后会报出“During handling of the above exception, another exception occurred:”
x = 2
y = 0
try:
result = x / y
except ZeroDivisionError:
raise ValueError('raise in exception clause')
原创
2021-09-01 10:48:58 ·
3980 阅读 ·
0 评论