Skip to content

Commit 6361cf3

Browse files
authored
try..catch on svg processing in benchmarks (#10149)
1 parent 356eb15 commit 6361cf3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ydb/public/lib/ydb_cli/commands/ydb_benchmark.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,13 @@ void TWorkloadCommandBenchmark::SavePlans(const BenchmarkUtils::TQueryBenchmarkR
475475
}
476476
{
477477
TPlanVisualizer pv;
478-
pv.LoadPlans(res.GetQueryPlan());
479478
TFileOutput out(planFName + "svg");
480-
out << pv.PrintSvgSafe();
479+
try {
480+
pv.LoadPlans(res.GetQueryPlan());
481+
out << pv.PrintSvg();
482+
} catch (std::exception& e) {
483+
out << "<svg width='1024' height='256' xmlns='http://www.w3.org/2000/svg'><text>" << e.what() << "<text></svg>";
484+
}
481485
}
482486
}
483487
if (res.GetPlanAst()) {

0 commit comments

Comments
 (0)