# 任何方法都可能抛出错误def method_with_exception(): raise Exception("test exception")method_with_exception() # <-Error