diff --git a/src/flatc.cpp b/src/flatc.cpp index 599a9c8c1..40f0ae2c9 100755 --- a/src/flatc.cpp +++ b/src/flatc.cpp @@ -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(