Module: check_mk
Branch: master
Commit: d59780795df58b54baa4f53029ddfdc94190e87e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d59780795df58b…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue May 8 14:58:50 2018 +0200
Fixed exception type.
Change-Id: I5586b64414fc37d2af8604342d154ce4ae467c37
---
livestatus/src/Query.cc | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/livestatus/src/Query.cc b/livestatus/src/Query.cc
index bba16f9..1d7f19a 100644
--- a/livestatus/src/Query.cc
+++ b/livestatus/src/Query.cc
@@ -230,8 +230,9 @@ void Query::parseAndOrLine(char *line, Filter::Kind kind,
void Query::parseNegateLine(char *line, FilterStack &filters) {
checkNoArguments(line);
if (filters.empty()) {
- throw("error combining filters for table '" + _table.name() +
- "': expected 1 filters, but only 0 are on stack");
+ throw std::runtime_error(
+ "error combining filters for table '" + _table.name() +
+ "': expected 1 filters, but only 0 are on stack");
}
auto top = std::move(filters.back());
@@ -262,8 +263,9 @@ void Query::parseStatsAndOrLine(char *line,
void Query::parseStatsNegateLine(char *line) {
checkNoArguments(line);
if (_stats_columns.empty()) {
- throw("error combining filters for table '" + _table.name() +
- "': expected 1 filters, but only 0 are on stack");
+ throw std::runtime_error(
+ "error combining filters for table '" + _table.name() +
+ "': expected 1 filters, but only 0 are on stack");
}
auto to_negate = _stats_columns.back()->stealFilter();
_stats_columns.pop_back();