Add more context to error messages

This commit is contained in:
Alexander Kuzmenkov 2020-10-23 15:20:07 +03:00
parent 09acceadf7
commit d17a49f127

View File

@ -29,7 +29,15 @@ public:
if constexpr (!_top_to_bottom)
visitChildren(ast);
try
{
Matcher::visit(ast, data);
}
catch (Exception & e)
{
e.addMessage("While processing {}", ast->formatForErrorMessage());
throw;
}
if constexpr (_top_to_bottom)
visitChildren(ast);