Throw exception on multiple parse error

This commit is contained in:
Jonathan Müller 2017-06-23 13:01:08 +02:00
commit 204961b7b1
5 changed files with 42 additions and 5 deletions

View file

@ -48,6 +48,12 @@ namespace
{
context.logger->log("libclang parser", ex.get_diagnostic());
}
catch (std::logic_error& ex)
{
context.logger->log("libclang parser",
diagnostic{ex.what(), detail::make_location(child),
severity::error});
}
});
}
else
@ -66,6 +72,14 @@ namespace
{
context.logger->log("libclang parser", ex.get_diagnostic());
}
catch (std::logic_error& ex)
{
context.logger->log("libclang parser",
diagnostic{ex.what(),
detail::make_location(
clang_Cursor_getArgument(cur, unsigned(i))),
severity::error});
}
}
}