returns
| 105 | |
| 106 | // returns <resolved name, was default file> |
| 107 | std::pair<std::string, bool> ClusterConnectionFile::lookupClusterFileName(std::string const& filename) { |
| 108 | if (filename.length()) |
| 109 | return std::make_pair(filename, false); |
| 110 | |
| 111 | std::string f; |
| 112 | bool isDefaultFile = true; |
| 113 | if (platform::getEnvironmentVar(CLUSTER_FILE_ENV_VAR_NAME, f)) { |
| 114 | // If this is set but points to a file that does not |
| 115 | // exist, we will not fallback to any other methods |
| 116 | isDefaultFile = false; |
| 117 | } else if (fileExists("fdb.cluster")) |
| 118 | f = "fdb.cluster"; |
| 119 | else |
| 120 | f = platform::getDefaultClusterFilePath(); |
| 121 | |
| 122 | return std::make_pair(f, isDefaultFile); |
| 123 | } |
| 124 | |
| 125 | // get a human readable error message describing the error returned from the constructor |
| 126 | std::string ClusterConnectionFile::getErrorString(std::pair<std::string, bool> const& resolvedClusterFile, |
nothing calls this directly
no test coverage detected