Python將異常信息轉爲字符串

Python將異常信息轉爲字符串 try: test() except: import traceback, sys traceback.print_exc() # 打印異常信息 exc_type, exc_value, exc_traceback = sys.exc_info() error = str(repr(traceback.forma
相關文章
相關標籤/搜索