Python try/except: Showing the cause of the error after displaying my variables

前端 未结 7 804
萌比男神i
萌比男神i 2020-12-24 05:51

I\'m not even sure what the right words are to search for. I want to display parts of the error object in an except block (similar to the err object in VBScript, which has E

相关标签:
7条回答
  • 2020-12-24 06:42

    The string value of the exception object will give you the reason. The traceback module will allow you access to the full traceback.

    0 讨论(0)
提交回复
热议问题