Print error message when we can't parse a .ini assignment line.
authorSteve Reinhardt <stever@eecs.umich.edu>
Fri, 24 Oct 2003 01:51:12 +0000 (18:51 -0700)
committerSteve Reinhardt <stever@eecs.umich.edu>
Fri, 24 Oct 2003 01:51:12 +0000 (18:51 -0700)
--HG--
extra : convert_revision : b7e19ff42ddd9a21571e086c11e143d9290e0e38

base/inifile.cc

index 7fd2f55684d9746fc64aac6125826b80169b8825..6baf2285034150eef569830817abb01dab06e672 100644 (file)
@@ -217,8 +217,11 @@ bool
 IniFile::Section::add(const std::string &assignment)
 {
     string::size_type offset = assignment.find('=');
-    if (offset == string::npos)  // no '=' found
+    if (offset == string::npos) {
+        // no '=' found
+        cerr << "Can't parse .ini line " << assignment << endl;
         return false;
+    }
 
     // if "+=" rather than just "=" then append value
     bool append = (assignment[offset-1] == '+');