Skip to content

Commit

Permalink
fix(combinator): catch and log Display Expression errors
Browse files Browse the repository at this point in the history
  • Loading branch information
floork committed Jan 27, 2025
1 parent 01e0b50 commit 2c47091
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/combinator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,14 @@ void Combinator::on_transformer_config(const metricq::json& config)
// Register the combined metric as a new source metric
auto& metric = (*this)[combined_name];

metric.metadata["displayExpression"] = displayExpression(combined_expression);
try
{
metric.metadata["displayExpression"] = displayExpression(combined_expression);
}
catch (std::runtime_error&)
{
Log::error("Failed to create the Display Expression");
}

if (combined_config.count("chunk_size"))
{
Expand Down

0 comments on commit 2c47091

Please sign in to comment.