阅读背景:

Python try / except:显示变量后显示错误原因

来源:互联网 

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 Err.Number and Err.Description). For example, I want to show the values of my variables, then show the exact error. Clearly, I am causing a divided-by-zero error below, but how can I print that fact? I'm not even sure what the right words are to s




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: