mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-03 04:21:13 +00:00
Add logging of warnings from the flatc compiler (#5289)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
d07a3d2f4c
commit
98b9b5a933
@@ -99,8 +99,10 @@ void DeserializeDoc( std::vector<std::string> &doc,
|
||||
}
|
||||
|
||||
void Parser::Message(const std::string &msg) {
|
||||
error_ = file_being_parsed_.length() ? AbsolutePath(file_being_parsed_) : "";
|
||||
if (!error_.empty()) error_ += "\n"; // log all warnings and errors
|
||||
error_ += file_being_parsed_.length() ? AbsolutePath(file_being_parsed_) : "";
|
||||
// clang-format off
|
||||
|
||||
#ifdef _WIN32 // MSVC alike
|
||||
error_ +=
|
||||
"(" + NumToString(line_) + ", " + NumToString(CursorPosition()) + ")";
|
||||
|
||||
Reference in New Issue
Block a user