Loads and parses the file at 'filename', throwing errors if the file cannot be read or the format is invalid.
| 24 | |
| 25 | // Loads and parses the file at 'filename', throwing errors if the file cannot be read or the format is invalid. |
| 26 | ClusterConnectionFile::ClusterConnectionFile(std::string const& filename) |
| 27 | : IClusterConnectionRecord(ConnectionStringNeedsPersisted::False) { |
| 28 | if (!fileExists(filename)) { |
| 29 | throw no_cluster_file_found(); |
| 30 | } |
| 31 | |
| 32 | cs = ClusterConnectionString(readFileBytes(filename, MAX_CLUSTER_FILE_BYTES)); |
| 33 | this->filename = filename; |
| 34 | } |
| 35 | |
| 36 | // Creates a cluster file with a given connection string and saves it to the specified file. |
| 37 | ClusterConnectionFile::ClusterConnectionFile(std::string const& filename, ClusterConnectionString const& contents) |
nothing calls this directly
no test coverage detected