python异常处理
2021-06-04 12:02
阅读:628
标签:class imp value lan cep error ISE 异常 exp python异常处理 标签:class imp value lan cep error ISE 异常 exp 原文地址:https://www.cnblogs.com/amize/p/14656600.html
import sys
try:
raise ValueError(‘this is a exp‘)
except Exception as ex:
ex_type, ex_val, ex_stack = sys.exc_info()
print(ex_type)
print(ex_val)
评论
亲,登录后才可以留言!