Wrap prints more detailed error message for parse errors

release/4.3a0
Richard Roberts 2012-12-03 19:08:16 +00:00
parent e43e1affd3
commit 0898e4a6aa
1 changed files with 4 additions and 0 deletions

View File

@ -367,6 +367,10 @@ void Module::parseMarkup(const std::string& data) {
parse_info<const char*> info = parse(data.c_str(), module_p, space_p);
if(!info.full) {
printf("parsing stopped at \n%.20s\n",info.stop);
cout << "Stopped near:\n"
"class '" << cls.name << "'\n"
"method '" << methodName << "'\n"
"argument '" << arg.name << "'" << endl;
throw ParseFailed((int)info.length);
}