#The try block will generate an error, because x is not defined:
try:
print(x)
except:
print("An exception occurred")