一、手动抛出异常
x = 10 if x > 5: raise Exception(‘x 不能大于 5。x 的值为: {}‘.format(x))
异常except
原文:https://www.cnblogs.com/tangjun112/p/13777119.html