Improve error message

This commit is contained in:
Bob Polis 2024-10-15 12:52:45 +02:00
parent 06060dab7c
commit caf1d43331

View File

@ -83,7 +83,7 @@ map<string, string> sc::parse_ini_file(const string& path, bool ignore_sections)
string prefix; string prefix;
string line; string line;
ifstream file {path}; ifstream file {path};
if (!file) throw runtime_error {string {"could not open "} + path}; if (!file) throw runtime_error {string {"could not open: "} + path};
while (getline(file, line)) { while (getline(file, line)) {
if (line[0] == '#') continue; // ignore comments if (line[0] == '#') continue; // ignore comments
if (line[0] == '[') { if (line[0] == '[') {