python 让异常名称显示出来

  try:

    pass

  except Exception as e:

    print(e)

  import sys

  try:

    pass

  except:

    print(sys.exc_info())

下面有其他的方法:

http://blog.sina.com.cn/s/blog_628cc2b70102wccg.html

原文地址:https://www.cnblogs.com/beforeluck-shang/p/8317584.html