I'm trying to display a user-friendly error message while also displaying the exception but I can't seem to make it work.
I've tried these but got invalid syntax errors:
#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
It would be great if someone could help me out with this. Thanks!