Skip to content

Commit 2c47091

Browse files
committed
fix(combinator): catch and log Display Expression errors
1 parent 01e0b50 commit 2c47091

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/combinator.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,14 @@ void Combinator::on_transformer_config(const metricq::json& config)
201201
// Register the combined metric as a new source metric
202202
auto& metric = (*this)[combined_name];
203203

204-
metric.metadata["displayExpression"] = displayExpression(combined_expression);
204+
try
205+
{
206+
metric.metadata["displayExpression"] = displayExpression(combined_expression);
207+
}
208+
catch (std::runtime_error&)
209+
{
210+
Log::error("Failed to create the Display Expression");
211+
}
205212

206213
if (combined_config.count("chunk_size"))
207214
{

0 commit comments

Comments
 (0)