private static void Ensure(LifecycleAction action, string operation) { try { action.Perform(); } catch (Exception cause) { throw new LifecycleException("Failed to " + operation, cause); } }