Skip to content

Commit

Permalink
Improved error message for invalid RPN
Browse files Browse the repository at this point in the history
Change-Id: I09ed9ac8e43cd040d752b2513e0c39f5dedd1928
  • Loading branch information
spt29 committed Feb 13, 2025
1 parent fecf5fd commit d321ec6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/livestatus/src/RRDColumn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,13 @@ std::vector<RRDDataMaker::value_type> RRDDataMaker::make(
auto [ptr, ec] =
std::from_chars(dsname_view.begin(), dsname_view.end(), dsname);
if (ec != std::errc{}) {
Warning(logger) << "Invalid location: " << location.data_source_name_;
Warning(logger)
<< "cannot locate an RRD containing the metric of the RPN expression '"
<< args_.rpn << "' for the "
<< (service_description == dummy_service_description()
? "host '" + host_name + "'"
: "service '" + host_name + ";" + service_description +
"'");
return {};
}

Expand Down

0 comments on commit d321ec6

Please sign in to comment.