flatc now outputs the filename with error messages.
authorWouter van Oortmerssen <wvo@google.com>
Thu, 21 Aug 2014 22:44:51 +0000 (15:44 -0700)
committerWouter van Oortmerssen <wvo@google.com>
Fri, 22 Aug 2014 21:02:32 +0000 (14:02 -0700)
Bug: 16683956
Change-Id: Id8435e868899ca0bbf0add84852a54bfaea63b4a
Tested: on OS X.

src/flatc.cpp

index 599a9c8..40f0ae2 100755 (executable)
@@ -172,7 +172,7 @@ int main(int argc, const char *argv[]) {
           contents.length());
       } else {
         if (!parser.Parse(contents.c_str(), file_it->c_str()))
-          Error(parser.error_.c_str());
+          Error((*file_it + ": " + parser.error_).c_str());
       }
 
       std::string filebase = flatbuffers::StripPath(