From: Steve Reinhardt Date: Fri, 24 Oct 2003 01:51:12 +0000 (-0700) Subject: Print error message when we can't parse a .ini assignment line. X-Git-Tag: m5_1.0_beta2~361^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=21c7ee1e3ef10cc1ace8d6f29f41c18358b8c0f4;p=gem5.git Print error message when we can't parse a .ini assignment line. --HG-- extra : convert_revision : b7e19ff42ddd9a21571e086c11e143d9290e0e38 --- diff --git a/base/inifile.cc b/base/inifile.cc index 7fd2f5568..6baf22850 100644 --- a/base/inifile.cc +++ b/base/inifile.cc @@ -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] == '+');