我想用
try excpept
块来处理一些函数调用。有什么更好更干净的方法吗。我目前的流程是
def handle_exception():
except Exception:
print("Failed to init module x")
except Exception:
print("Failed to init module y")
except Exception:
print("Failed to init module z")