summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IcePack/Parser.cpp')
-rw-r--r--cpp/src/IcePack/Parser.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp
index 1f3febedad8..da7cb9be577 100644
--- a/cpp/src/IcePack/Parser.cpp
+++ b/cpp/src/IcePack/Parser.cpp
@@ -216,9 +216,12 @@ IcePack::Parser::error(const char* s)
{
if (!yycommands && !isatty(fileno(yyin)))
{
- cerr << _currentFile << ':' << _currentLine << ' ';
+ cerr << _currentFile << ':' << _currentLine << ": " << s << endl;
+ }
+ else
+ {
+ cerr << "error: " << s << endl;
}
- cerr << "error: " << s << endl;
yynerrs++;
}
@@ -233,9 +236,12 @@ IcePack::Parser::warning(const char* s)
{
if (!yycommands && !isatty(fileno(yyin)))
{
- cerr << _currentFile << ':' << _currentLine << ' ';
+ cerr << _currentFile << ':' << _currentLine << ": warning: " << s << endl;
+ }
+ else
+ {
+ cerr << "warning: " << s << endl;
}
- cerr << "warning: " << s << endl;
}
void