Improve error reporting for builtin_test

This commit is contained in:
ridiculousfish 2012-03-07 01:16:50 -08:00
parent 143ead8d00
commit 0ced7d8e56

View file

@ -379,9 +379,12 @@ namespace test_expressions {
expression *result = parser.parse_expression(0, (unsigned int)args.size());
/* Handle errors */
for (size_t i = 0; i < parser.errors.size(); i++) {
if (i > 0)
err.push_back(L'\n');
err.append(L"test: ");
err.append(parser.errors.at(i));
err.push_back(L'\n');
// For now we only show the first error
break;
}
return result;
}