I want to handle few function calls using try excpept block. Is there any better and cleaner way to do it. My current flow is
def handle_exception():
try:
x()
except Exception:
print("Failed to init module x")
try:
y()
except Exception:
print("Failed to init module y")
try:
z()
except Exception:
print("Failed to init module z")