Module: check_mk
Branch: master
Commit: d0f2171bde0cb74354d0138128a1af77b137745e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d0f2171bde0cb7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jul 16 07:18:22 2018 +0200
Fixed wrong table in error message
The error message was using the column name instead of the table name.
Example:
replacing non-existing column
'rrddata:m1:load15.max:1531519200:1531605599:1' with null column,
reason: table 'rrddata' has no dynamic column 'rrddata'
Change-Id: Ib19711a4699ffe7aab471e87a009c1869d4d58d4
---
livestatus/src/Table.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/livestatus/src/Table.cc b/livestatus/src/Table.cc
index c7f848d..3f5a946 100644
--- a/livestatus/src/Table.cc
+++ b/livestatus/src/Table.cc
@@ -74,7 +74,7 @@ std::unique_ptr<Column> Table::dynamicColumn(const std::string
&colname,
const std::string &rest) const {
auto it = _dynamic_columns.find(colname);
if (it == _dynamic_columns.end()) {
- throw std::runtime_error("table '" + colname +
+ throw std::runtime_error("table '" + name() +
"' has no dynamic column '" + colname
+ "'");
}
auto sep_pos = rest.find(':');