From 953183d9053d67d031a9f62424ada71e93b90b55 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Wed, 2 Sep 2009 00:29:06 +0700 Subject: [PATCH] Print error messages to stderr (instead of stdout). --- src/mathlib.cpp | 2 +- src/token.cpp | 2 +- src/tokenize.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mathlib.cpp b/src/mathlib.cpp index 6b2a670f1..33f649dd1 100644 --- a/src/mathlib.cpp +++ b/src/mathlib.cpp @@ -216,7 +216,7 @@ std::string MathLib::calculate(const std::string &first, const std::string &seco break; default: - std::cout << "##### If you see this, there is a bug: " + std::cerr << "##### If you see this, there is a bug: " << "MathLib::calculate() was called with unknown action '" << action << "' #####" diff --git a/src/token.cpp b/src/token.cpp index f0d1295df..99facfcaf 100644 --- a/src/token.cpp +++ b/src/token.cpp @@ -385,7 +385,7 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid) { if (varid == 0) { - std::cout << "\n###### If you see this, there is a bug ###### Token::Match() - varid was 0" << std::endl; + std::cerr << "\n###### If you see this, there is a bug ###### Token::Match() - varid was 0" << std::endl; } if (tok->varId() != varid) diff --git a/src/tokenize.cpp b/src/tokenize.cpp index 443db6f68..76bdba635 100644 --- a/src/tokenize.cpp +++ b/src/tokenize.cpp @@ -3503,7 +3503,7 @@ void Tokenizer::syntaxError(const Token *tok, char c) if (!_errorLogger) { - std::cout << "### Unlogged error at Tokenizer::syntaxError: Invalid number of character (" + std::cerr << "### Unlogged error at Tokenizer::syntaxError: Invalid number of character (" << c << ")" << std::endl; return;