Improve error message
This commit is contained in:
parent
06060dab7c
commit
caf1d43331
@ -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] == '[') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user