improved logging errors
This commit is contained in:
@@ -7,11 +7,14 @@ void check_parser_errors(const std::vector<ast::error::error*>& errors) {
|
|||||||
if (errors.empty())
|
if (errors.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::cerr << "parser has " << errors.size() << " errors:\n";
|
INFO("parser has " << errors.size() << " errors:");
|
||||||
for (const auto& error : errors)
|
std::ostringstream combined;
|
||||||
std::cerr << '\t' << error->what() << "\n";
|
for (auto& err : errors)
|
||||||
|
combined << " > " << err->what() << '\n';
|
||||||
|
|
||||||
FAIL_CHECK("Parser had errors. See stderr for details.");
|
INFO(combined.str());
|
||||||
|
|
||||||
|
FAIL("Parser had errors.");
|
||||||
}
|
}
|
||||||
|
|
||||||
void ParserFixture::setup(std::string source) {
|
void ParserFixture::setup(std::string source) {
|
||||||
|
Reference in New Issue
Block a user