Is it possible to catch any error in Python? I don\'t care what the specific exceptions will be, because all of them will have the same fallback.
Not mentioning the type of exception you want to handle itself does the job.
try this:
try:
#code in which you expect an exception
except:
#prints the exception occured
if you want to know the type of exception occurred:
try:
#code in which you expect an exception
except Exception as e:
print(e)
#for any exception to be catched
for detailed explanation go trough this https://www.tutorialspoint.com/python/python_exceptions.htm