1 异常:
def exceptionHandling(): try: a = 10 b = 0 d = a / b print(d) except ZeroDivisionError as ex: print("exception 1 " + str(ex) ) except BaseException as ex: print("exception 2 " + str(ex)) exceptionHandling()
2
原文:https://www.cnblogs.com/liufei1983/p/9865999.html