From a5ce4fd3c312281d4e91d0ad9ddab5ff9c240563 Mon Sep 17 00:00:00 2001 From: Reijo Tomperi Date: Mon, 9 Nov 2009 01:11:52 +0200 Subject: [PATCH] Made some syntax errors slightly easier to detect. --- lib/preprocessor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index 7182cf832..252f0bbe0 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -880,7 +880,10 @@ std::list Preprocessor::getcfgs(const std::string &filedata) { Tokenizer tokenizer; std::istringstream istr(s.c_str()); - tokenizer.tokenize(istr, ""); + if (!tokenizer.tokenize(istr, "")) + { + std::cerr << "Error parsing this:\n" << s << "\n\n"; + } const Token *tok = tokenizer.tokens();