python获取异常信息

try:
  print(a)
except Exception as e:
  print(e)

 

posted @ 2021-12-30 14:19  菜鸟小远  阅读(67)  评论(0)    收藏  举报