Make dimension error message print the counter name (#658)
* temp * source formatting (clang-format v11) (#659) Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bwelton <1683479+bwelton@users.noreply.github.com>
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
f633278720
commit
f0924c6aa7
@@ -117,10 +117,18 @@ get_dimension_cache()
|
||||
const auto& asts = counters::get_ast_map();
|
||||
for(const auto& [gfx, metrics] : asts)
|
||||
{
|
||||
for(const auto& [_, ast] : metrics)
|
||||
for(const auto& [metric, ast] : metrics)
|
||||
{
|
||||
auto ast_copy = ast;
|
||||
dims.emplace(ast.out_id().handle, ast_copy.set_dimensions());
|
||||
try
|
||||
{
|
||||
dims.emplace(ast.out_id().handle, ast_copy.set_dimensions());
|
||||
} catch(std::runtime_error& e)
|
||||
{
|
||||
LOG(ERROR) << metric << " has improper dimensions"
|
||||
<< " " << e.what();
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
return dims;
|
||||
|
||||
Reference in New Issue
Block a user