aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/attr-path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/attr-path.cc')
-rw-r--r--src/libexpr/attr-path.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libexpr/attr-path.cc b/src/libexpr/attr-path.cc
index 0764fc05c..2e2a17b14 100644
--- a/src/libexpr/attr-path.cc
+++ b/src/libexpr/attr-path.cc
@@ -19,7 +19,7 @@ static Strings parseAttrPath(std::string_view s)
++i;
while (1) {
if (i == s.end())
- throw Error(format("missing closing quote in selection path '%1%'") % s);
+ throw Error("missing closing quote in selection path '%1%'", s);
if (*i == '"') break;
cur.push_back(*i++);
}
@@ -69,11 +69,11 @@ std::pair<Value *, Pos> findAlongAttrPath(EvalState & state, const string & attr
if (v->type != tAttrs)
throw TypeError(
- format("the expression selected by the selection path '%1%' should be a set but is %2%")
- % attrPath % showType(*v));
-
+ "the expression selected by the selection path '%1%' should be a set but is %2%",
+ attrPath,
+ showType(*v));
if (attr.empty())
- throw Error(format("empty attribute name in selection path '%1%'") % attrPath);
+ throw Error("empty attribute name in selection path '%1%'", attrPath);
Bindings::iterator a = v->attrs->find(state.symbols.create(attr));
if (a == v->attrs->end())
@@ -86,9 +86,9 @@ std::pair<Value *, Pos> findAlongAttrPath(EvalState & state, const string & attr
if (!v->isList())
throw TypeError(
- format("the expression selected by the selection path '%1%' should be a list but is %2%")
- % attrPath % showType(*v));
-
+ "the expression selected by the selection path '%1%' should be a list but is %2%",
+ attrPath,
+ showType(*v));
if (attrIndex >= v->listSize())
throw AttrPathNotFound("list index %1% in selection path '%2%' is out of range", attrIndex, attrPath);