我试图显示一个用户友好的错误消息,同时也显示异常,但我似乎无法使它工作。你知道吗
我尝试了这些,但出现了无效的语法错误:
#First try:
except Exception as e, ValueError:
print("\nThe program is unable to calculate the given equation. " +
"Try Again!")
print("\nError message " + e)
continue
#Second try:
except ValueError, Exception as e:
print("\nThe program is unable to calculate the given equation. " +
"Try Again!")
print("\nError message " + e)
continue
如果有人能帮我解决这个问题就太好了。谢谢!你知道吗
您可以使用回溯:
相关问题 更多 >
编程相关推荐