摘要: #sys.exec_info()捕捉异常 import sys import traceback try: with open("hello.txt") as file: #没这个文件,肯定报错 pass except Exception as e: print("e ",e) exc_type,e 阅读全文
posted @ 2020-03-11 22:28 腹肌猿 阅读(258) 评论(0) 推荐(0) 编辑