aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArne Juul <arnej@yahooinc.com>2023-02-16 10:02:03 +0000
committerArne Juul <arnej@yahooinc.com>2023-02-16 10:02:03 +0000
commitfcbdb927720e0299da4e27fb25bd3cf16dd26cf8 (patch)
tree8b684648a6a911116d6c5359cd801fb658ce41bc
parent1a55e5a4a30c7697c3ae7f5764c48aee6700818a (diff)
simplify and use chomp()
-rw-r--r--searchlib/src/vespa/searchlib/fef/blueprintresolver.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/searchlib/src/vespa/searchlib/fef/blueprintresolver.cpp b/searchlib/src/vespa/searchlib/fef/blueprintresolver.cpp
index eb1876da45c..864dd64b98f 100644
--- a/searchlib/src/vespa/searchlib/fef/blueprintresolver.cpp
+++ b/searchlib/src/vespa/searchlib/fef/blueprintresolver.cpp
@@ -134,14 +134,8 @@ struct Compiler : public Blueprint::DependencyHandler {
failed_set.insert(feature_name);
auto trace = make_trace(skip_self);
vespalib::string msg;
- if (trace.empty()) {
- msg = fmt("invalid %s: %s", describe(feature_name).c_str(), reason.c_str());
- } else {
- msg = fmt("invalid %s: %s\n%s", describe(feature_name).c_str(), reason.c_str(), trace.c_str());
- }
- if (msg.rbegin()[0] == '\n') {
- msg.pop_back();
- }
+ msg = fmt("invalid %s: %s\n%s", describe(feature_name).c_str(), reason.c_str(), trace.c_str());
+ msg.chomp();
errors.emplace_back(msg);
}
probe_stack();