Skip to content

Commit

Permalink
Change request and new endpoint to return all available metrics for a…
Browse files Browse the repository at this point in the history
…n AST node.
  • Loading branch information
intjftw committed Feb 27, 2024
1 parent 6e20310 commit 70e591e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/cpp_metrics/service/src/cppmetricsservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ double CppMetricsServiceHandler::getSingleCppMetricForAstNode(
CppAstNodeMetricsQuery::type == static_cast<model::CppAstNodeMetrics::Type>(metric_));

if (nodeMetric.empty())
return -DBL_MAX;
{
core::InvalidInput ex;
ex.__set_msg("Invalid metric type for AST node: " + astNodeId_);
throw ex;
}

return nodeMetric.begin()->value;
});
Expand Down

0 comments on commit 70e591e

Please sign in to comment.