diff --git a/src/ObjLoading/Parsing/Menu/MenuFileReader.cpp b/src/ObjLoading/Parsing/Menu/MenuFileReader.cpp index 41090011..751d9103 100644 --- a/src/ObjLoading/Parsing/Menu/MenuFileReader.cpp +++ b/src/ObjLoading/Parsing/Menu/MenuFileReader.cpp @@ -79,25 +79,25 @@ bool MenuFileReader::IsValidEndState(const MenuFileParserState* state) const { if (state->m_current_item) { - std::cout << "In \"" << m_file_name << "\": Unclosed item at end of file!\n"; + std::cerr << "In \"" << m_file_name << "\": Unclosed item at end of file!\n"; return false; } if (state->m_current_menu) { - std::cout << "In \"" << m_file_name << "\": Unclosed menu at end of file!\n"; + std::cerr << "In \"" << m_file_name << "\": Unclosed menu at end of file!\n"; return false; } if (state->m_current_function) { - std::cout << "In \"" << m_file_name << "\": Unclosed function at end of file!\n"; + std::cerr << "In \"" << m_file_name << "\": Unclosed function at end of file!\n"; return false; } if (state->m_in_global_scope) { - std::cout << "In \"" << m_file_name << "\": Did not close global scope!\n"; + std::cerr << "In \"" << m_file_name << "\": Did not close global scope!\n"; return false; } @@ -137,11 +137,11 @@ std::unique_ptr MenuFileReader::ReadMenuFile() if (!parser->Parse()) { - std::cout << "Parsing menu file failed!" << std::endl; + std::cerr << "Parsing menu file failed!" << std::endl; const auto* parserEndState = parser->GetState(); if(parserEndState->m_current_event_handler_set && !parserEndState->m_permissive_mode) - std::cout << "You can use the --menu-permissive option to try to compile the event handler script anyway." << std::endl; + std::cerr << "You can use the --menu-permissive option to try to compile the event handler script anyway." << std::endl; return nullptr; } diff --git a/src/Parser/Parsing/Impl/AbstractParser.h b/src/Parser/Parsing/Impl/AbstractParser.h index f4daec39..ba83b481 100644 --- a/src/Parser/Parsing/Impl/AbstractParser.h +++ b/src/Parser/Parsing/Impl/AbstractParser.h @@ -64,12 +64,12 @@ public: if (!line.IsEof()) { - std::cout << "Error: " << pos.m_filename.get() << " L" << pos.m_line << ':' << pos.m_column << " Could not parse expression:\n" + std::cerr << "Error: " << pos.m_filename.get() << " L" << pos.m_line << ':' << pos.m_column << " Could not parse expression:\n" << line.m_line.substr(pos.m_column - 1) << std::endl; } else { - std::cout << "Error: " << pos.m_filename.get() << " L" << pos.m_line << ':' << pos.m_column << " Could not parse expression." << std::endl; + std::cerr << "Error: " << pos.m_filename.get() << " L" << pos.m_line << ':' << pos.m_column << " Could not parse expression." << std::endl; } return false; } @@ -82,11 +82,11 @@ public: if (!line.IsEof() && line.m_line.size() > static_cast(pos.m_column - 1)) { - std::cout << "Error: " << e.FullMessage() << "\n" << line.m_line.substr(pos.m_column - 1) << std::endl; + std::cerr << "Error: " << e.FullMessage() << "\n" << line.m_line.substr(pos.m_column - 1) << std::endl; } else { - std::cout << "Error: " << e.FullMessage() << std::endl; + std::cerr << "Error: " << e.FullMessage() << std::endl; } return false;